Package org.exolab.castor.jdo.oql
Class ParamInfo
java.lang.Object
org.exolab.castor.jdo.oql.ParamInfo
A class to store and check information about numbered query parameters.
- Version:
- $Revision: 7950 $ $Date: 2006-01-29 09:29:46 -0700 (Sun, 29 Jan 2006) $
- Author:
- Nissim Karpenstein
-
Constructor Summary
ConstructorsConstructorDescriptionParamInfo
(String userDefinedType, String systemType, FieldDescriptor desc, ClassLoader classLoader) Creates a new ParamInfo. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks whether the userDefinedType and systemType match those previousle specified in the constructor.Returns the Java field type.Returns the SQL type.Accessor method for _class.boolean
Specifies whether this parameter was specified in the OQL with a User defined type, like $(int)1.
-
Constructor Details
-
ParamInfo
public ParamInfo(String userDefinedType, String systemType, FieldDescriptor desc, ClassLoader classLoader) throws QueryException Creates a new ParamInfo. Which checks for incompatibilities between types.- Parameters:
userDefinedType
- The user defined type, empty string if undefined.systemType
- The system generated typedesc
- JDO field descriptor.classLoader
- ClassLoader instance, null if not specified.- Throws:
QueryException
- if the user defined type cannot be converted to the systemType or if the type is not found.
-
-
Method Details
-
check
Checks whether the userDefinedType and systemType match those previousle specified in the constructor.- Parameters:
userDefinedType
- The user defined type, empty string if undefined.systemType
- The system generated type- Throws:
QueryException
- if the user defined type is not the same as the one prevuiously specified in the constructor, or if the systemType is not convertable to the original systemType.
-
isUserDefined
public boolean isUserDefined()Specifies whether this parameter was specified in the OQL with a User defined type, like $(int)1.- Returns:
- True if this parameter whas a user defined type otherwise false
-
getTheClass
Accessor method for _class.- Returns:
- private member _class
-
getFieldType
Returns the Java field type.- Returns:
- Java field type.
-
getSQLType
Returns the SQL type.- Returns:
- SQL type.
-
getConvertor
- Returns:
- Convertor that converts from the parameter type to SQL type of the parameter, if the latter is defined and not equal to the parameter class, otherwise returns null.
-