SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

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.


Field Summary
static int BIGDECIMAL
          The BigDecimal type, corresponds to Types.DECIMAL.
static int BIGINTEGER
          The BigInteger type, corresponds to Types.BIGINT.
static int BLOB
          The Blob type, corresponds to Types.BLOB.
static int BOOLEAN
          The boolean type, corresponds to Types.BIT.
static int BYTE
          The byte type, corresponds to Types.TINYINT.
static int CHARACTER
          The char type, corresponds to Types.CHAR.
static int CLOB
          The Clob type, corresponds to Types.CLOB.
static int DATE
          The Date type, corresponds to Types.DATE.
static int DOUBLE
          The double type, corresponds to Types.DOUBLE.
static int FLOAT
          The float type, corresponds to Types.FLOAT.
static int INTEGER
          The int type, corresponds to Types.INTEGER.
static int LENSTRING
          The variable length String type, corresponds to Types.VARCHAR.
static int LOCALE
          The Locale type, corresponds to Types.VARCHAR.
static int LONG
          The long type, corresponds to Types.NUMERIC.
static int SHORT
          The short type, corresponds to Types.SMALLINT.
static int STRING
          The String type, corresponds to Types.VARCHAR.
static int UNKNOWN
           
 
Constructor Summary
SQLTypes()
           
 
Method Summary
(package private) static void ()
           
static int getJDBCType(int type)
          Returning a mapping from Kodo defined types to 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
 

Field Detail

BOOLEAN

public static final int BOOLEAN
The boolean type, corresponds to Types.BIT.

BYTE

public static final int BYTE
The byte type, corresponds to Types.TINYINT.

CHARACTER

public static final int CHARACTER
The char type, corresponds to Types.CHAR.

DOUBLE

public static final int DOUBLE
The double type, corresponds to Types.DOUBLE.

FLOAT

public static final int FLOAT
The float type, corresponds to Types.FLOAT.

INTEGER

public static final int INTEGER
The int type, corresponds to Types.INTEGER.

LONG

public static final int LONG
The long type, corresponds to Types.NUMERIC.

SHORT

public static final int SHORT
The short type, corresponds to Types.SMALLINT.

STRING

public static final int STRING
The String type, corresponds to Types.VARCHAR.

LENSTRING

public static final int LENSTRING
The variable length String type, corresponds to Types.VARCHAR.

DATE

public static final int DATE
The Date type, corresponds to Types.DATE.

BLOB

public static final int BLOB
The Blob type, corresponds to Types.BLOB.

CLOB

public static final int CLOB
The Clob type, corresponds to Types.CLOB.

BIGDECIMAL

public static final int BIGDECIMAL
The BigDecimal type, corresponds to Types.DECIMAL.

BIGINTEGER

public static final int BIGINTEGER
The BigInteger type, corresponds to Types.BIGINT.

LOCALE

public static final int LOCALE
The Locale type, corresponds to Types.VARCHAR.

UNKNOWN

public static final int UNKNOWN
Constructor Detail

SQLTypes

public SQLTypes()
Method Detail

static void ()

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 Types types, for use in translating unknown PreparedStatement parameters into SQL types.

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.