org.exolab.castor.jdo.engine
public final class SQLTypes extends Object
Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:21 $
Nested Class Summary | |
---|---|
static class | SQLTypes.TypeConvertorInfo
Information used to locate a type convertor. |
static class | SQLTypes.TypeInfo |
Field Summary | |
---|---|
static SQLTypes.TypeConvertorInfo[] | _typeConvertors
List of all the default convertors between Java types. |
static SQLTypes.TypeInfo[] | _typeInfos
List of all the SQL types supported by Castor JDO. |
Method Summary | |
---|---|
static TypeConvertor | getConvertor(Class fromType, Class toType)
Returns a type convertor. |
static Object | getObject(ResultSet rs, int index, int sqlType) |
static int | getSQLType(Class javaType)
Returns the SQL type from the specified Java type. |
static String | javaToSqlName(String javaName)
Convert from Java name to SQL name. |
static String | paramFromName(String sqlTypeName)
Extracts parameter for type convertor from the name of the SQL type
of the form "SQL_type.domain".
|
static void | setObject(PreparedStatement stmt, int index, Object value, int sqlType) |
static String | sqlToJavaName(String sqlName, boolean className, String scope)
Convert from SQL name to Java name. |
static int | sqlTypeFromName(String sqlTypeName)
Returns the Java type from the SQL type name.
|
static Class | typeFromName(String sqlTypeName)
Returns the Java type from the SQL type name.
|
static Class | typeFromSQLType(int sqlType)
Returns the Java type from the SQL type.
|
Parameters: fromType The Java type to convert from toType The Java type to convert to
Throws: MappingException No suitable convertor was found
Parameters: javaType The Java class of the SQL type
Returns: SQL type from the specified Java type
For example:
Parameters: javaName The Java identifier name
Returns: An equivalent SQL identifier name
Parameters: sqlTypeName SQL type name (e.g. char[01])
Returns: Parameter (e.g. "01") or null
For example:
Parameters: sqlName The SQL identifier name className True if class name (first letter must be upper case) scope Optional scope preceding name (package name, compound field)
Returns: An equivalent Java identifier name
Parameters: sqlTypeName SQL type name (e.g. numeric)
Returns: The suitable Java type
Throws: MappingException The SQL type is not recognized.
Parameters: sqlTypeName SQL type name (e.g. numeric)
Returns: The suitable Java type
Throws: MappingException The SQL type is not recognized.
Parameters: sqlType SQL type name (see JDBC API)
Returns: The suitable Java type
Throws: MappingException The SQL type is not recognized.