com.solarmetric.kodo.impl.jdbc.schema
Class SQLTypes
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.schema.SQLTypes
- public class SQLTypes
- extends Object
Symbolic constants used to represent the various possible SQL types for
a value.
|
Method Summary |
static int |
getJDBCType(int type)
Returning a mapping from Kodo defined types to java.sql.Types
types, for use in translating unknown PreparedStatement parameters
into SQL types. |
static int |
getTypeConstant(Class javaClass,
int length)
Provides a standard mapping from java classes, including primitives
and their wrapper types, to the proper SQLTypes constant. |
static int |
getTypeConstant(int fmdType,
int length)
Provides a standard mapping from FieldMetaData type codes
to the correct SQL type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BOOLEAN
public static final int BOOLEAN
BYTE
public static final int BYTE
CHARACTER
public static final int CHARACTER
DOUBLE
public static final int DOUBLE
FLOAT
public static final int FLOAT
INTEGER
public static final int INTEGER
LONG
public static final int LONG
SHORT
public static final int SHORT
STRING
public static final int STRING
LENSTRING
public static final int LENSTRING
DATE
public static final int DATE
BLOB
public static final int BLOB
CLOB
public static final int CLOB
BIGDECIMAL
public static final int BIGDECIMAL
BIGINTEGER
public static final int BIGINTEGER
LOCALE
public static final int LOCALE
UNKNOWN
public static final int UNKNOWN
SQLTypes
public SQLTypes()
getTypeConstant
public static int getTypeConstant(Class javaClass,
int length)
- Provides a standard mapping from java classes, including primitives
and their wrapper types, to the proper SQLTypes constant.
Any unknown Object type is mapped to a BLOB. Any String of length -1
is mapped to a CLOB; Strings of other specified lengths (non-0) are
mapped to LENSTRING.
getTypeConstant
public static int getTypeConstant(int fmdType,
int length)
- Provides a standard mapping from
FieldMetaData type codes
to the correct SQL type. Any unknown object type is mapped to a BLOB.
Any string of length -1 is mapped to a CLOB; strings of other specified
lengths (non-0) are mapped to LENSTRING.
getJDBCType
public static int getJDBCType(int type)
- Returning a mapping from Kodo defined types to java.sql.Types
types, for use in translating unknown PreparedStatement parameters
into SQL types.
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.