|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataTypeMapper
Name: DataTypeMapper
Description: A interface intended to make the type conversion from
database types to java types more customizable.
Field Summary | |
---|---|
static int |
JAVA_TYPE_BOOLEAN
Constant for the java type boolean. |
static int |
JAVA_TYPE_DATE
Constant for the java type Date. |
static int |
JAVA_TYPE_DOUBLE
Constant for the java type double. |
static int |
JAVA_TYPE_FLOAT
Constant for the java type float. |
static int |
JAVA_TYPE_INT
Constant for the java type int. |
static int |
JAVA_TYPE_LONG
Constant for the java type long. |
static int |
JAVA_TYPE_OBJECT
Constant for the java type Object. |
static int |
JAVA_TYPE_STRING
Constant for the java type String. |
static int |
JAVA_TYPE_TIME
Constant for the java type Time. |
static int |
JAVA_TYPE_TIMESTAMP
Constant for the java type Timestamp. |
Method Summary | |
---|---|
int |
getJavaType(int sqlType,
int columnSize,
int decimalDigits)
Gets the JAVA type of the given SQL type. |
String |
getJavaTypeName(int sqlType,
int columnSize,
int decimalDigits,
boolean allowPrimitive,
boolean fullyQualified)
Gets the name of the given SQL type |
String |
getSqlTypeName(int sqlType)
Gets the name of the given SQL type |
Field Detail |
---|
static final int JAVA_TYPE_OBJECT
static final int JAVA_TYPE_INT
static final int JAVA_TYPE_LONG
static final int JAVA_TYPE_FLOAT
static final int JAVA_TYPE_DOUBLE
static final int JAVA_TYPE_BOOLEAN
static final int JAVA_TYPE_STRING
static final int JAVA_TYPE_DATE
static final int JAVA_TYPE_TIME
static final int JAVA_TYPE_TIMESTAMP
Method Detail |
---|
int getJavaType(int sqlType, int columnSize, int decimalDigits)
sqlType
- The SQL type ID from java.sql.Types.columnSize
- The size of the SQL type.decimalDigits
- The number of decimal digits.
JAVA_TYPE_OBJECT
,
JAVA_TYPE_INT
,
JAVA_TYPE_LONG
,
JAVA_TYPE_FLOAT
,
JAVA_TYPE_DOUBLE
,
JAVA_TYPE_BOOLEAN
,
JAVA_TYPE_STRING
,
JAVA_TYPE_DATE
,
JAVA_TYPE_TIME
,
JAVA_TYPE_TIMESTAMP
String getJavaTypeName(int sqlType, int columnSize, int decimalDigits, boolean allowPrimitive, boolean fullyQualified)
sqlType
- The SQL type ID from java.sql.Types.columnSize
- The size of the SQL type.decimalDigits
- The number of decimal digits.allowPrimitive
- If true, uses the simple types (int, long, float, double, ...) for
numeric values, otherwise returns the wrapper classed for these types.fullyQualified
- If true, returns the fully qualified class names for system classes,
else returns the system class names without java.lang package prefix.
String getSqlTypeName(int sqlType)
sqlType
- The SQL type ID from java.sql.Types.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |