org.exolab.castor.jdo.oql
Class ParamInfo
java.lang.Object
org.exolab.castor.jdo.oql.ParamInfo
public class ParamInfo
extends java.lang.Object
A class to store and check information about numbered query parameters.
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:23 $
void | check(String userDefinedType, String systemType) - Checks whether the userDefinedType and systemType match those previousle
specified in the constructor.
|
TypeConvertor | getConvertor()
|
String | getConvertorParam() - Returns the convertor parameter.
|
Class | getFieldType() - Returns the Java field type
|
Vector | getParamMap() - Accessor method for _sqlQueryParamMap.
|
Class | getSQLType() - Returns the SQL type
|
Class | getTheClass() - Accessor method for _class.
|
boolean | isUserDefined() - Specifies whether this parameter was specified in the OQL with a User
defined type, like $(int)1.
|
void | mapToSQLParam(int sqlParamIndex) - Maps this numbered parameter to the numbered SQL parameter.
|
ParamInfo
public ParamInfo(String userDefinedType,
String systemType,
JDOFieldDescriptor desc)
throws QueryException
Creates a new ParamInfo. Which checks for incompatibilities between types.
userDefinedType
- The user defined type, empty string if undefined.systemType
- The system generated type
QueryException
- if the user defined type cannot be converted to the
systemType or if the type is not found.
check
public void check(String userDefinedType,
String systemType)
throws QueryException
Checks whether the userDefinedType and systemType match those previousle
specified in the constructor.
userDefinedType
- The user defined type, empty string if undefined.systemType
- The system generated type
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.
getConvertor
public TypeConvertor getConvertor()
- 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.
getConvertorParam
public String getConvertorParam()
Returns the convertor parameter.
getFieldType
public Class getFieldType()
Returns the Java field type
getParamMap
public Vector getParamMap()
Accessor method for _sqlQueryParamMap.
- private member _sqlQueryParamMap.
getSQLType
public Class getSQLType()
Returns the SQL type
getTheClass
public Class getTheClass()
Accessor method for _class.
isUserDefined
public boolean isUserDefined()
Specifies whether this parameter was specified in the OQL with a User
defined type, like $(int)1.
- True if this parameter whas a user defined type otherwise false
mapToSQLParam
public void mapToSQLParam(int sqlParamIndex)
Maps this numbered parameter to the numbered SQL parameter.
sqlParamIndex
- The SQL parameter number.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com