|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The Java type associated with this SQL data typepublic interface DataType<T>
A common interface to all dialect-specific data types
Method Summary | ||
---|---|---|
|
asArrayDataType(Class<A> arrayDataType)
Retrieve the data type for an Oracle-style ARRAY of this data type |
|
|
asConvertedDataType(Converter<? super T,U> converter)
Retrieve the data type for a given converter |
|
|
asEnumDataType(Class<E> enumDataType)
Retrieve the data type for a given enum data type |
|
|
asMasterDataType(Class<M> masterDataType)
Retrieve the data type for a given master data type |
|
T |
convert(Object object)
Convert an arbitrary object into <T> |
|
DataType<T[]> |
getArrayDataType()
Retrieve the data type for an ARRAY of this data type |
|
Class<? extends T[]> |
getArrayType()
Retrieve the Java type associated with ARRAYs of this data type |
|
String |
getCastTypeName()
Retrieve the dialect-specific type name associated with this data type used for casting This is useful for some dialects that have specialised type names for cast expressions. |
|
String |
getCastTypeName(Configuration configuration)
Retrieve the dialect-specific type name associated with this data type used for casting This is useful for some dialects that have specialised type names for cast expressions. |
|
String |
getCastTypeName(Configuration configuration,
int precision,
int scale)
Retrieve the dialect-specific type name associated with this data type used for casting This is useful for some dialects that have specialised type names for cast expressions. |
|
DataType<T> |
getDataType(Configuration configuration)
The dialect-specific data type representing this data type. |
|
SQLDialect |
getDialect()
Retrieve the underlying SQLDialect |
|
SQLDataType<T> |
getSQLDataType()
Get the standard SQL data type of this (dialect-specific) data type if available. |
|
int |
getSQLType()
Get JDBC Types value |
|
Class<? extends T> |
getType()
Retrieve the Java type associated with this data type |
|
Class<?> |
getType(int precision,
int scale)
Retrieve a Java type associated with this data type and precision/scale |
|
String |
getTypeName()
Retrieve the dialect-specific type name associated with this data type |
|
String |
getTypeName(Configuration configuration)
Retrieve the dialect-specific type name associated with this data type |
|
boolean |
isArray()
Whether this data type is an array type. |
|
boolean |
isBinary()
Whether this data type is any binary type. |
|
boolean |
isDateTime()
Whether this data type is any date or time type. |
|
boolean |
isInterval()
Whether this data type is any interval type. |
|
boolean |
isNumeric()
Whether this data type is any numeric data type. |
|
boolean |
isString()
Whether this data type is any character data type. |
|
boolean |
isTemporal()
Whether this data type is any date or time type. |
Method Detail |
---|
SQLDataType<T> getSQLDataType()
DataType<T> getDataType(Configuration configuration)
int getSQLType()
Types
value
Class<? extends T> getType()
Class<?> getType(int precision, int scale)
Class<? extends T[]> getArrayType()
DataType<T[]> getArrayDataType()
<A extends ArrayRecord<T>> DataType<A> asArrayDataType(Class<A> arrayDataType)
<M extends MasterDataType<T>> DataType<M> asMasterDataType(Class<M> masterDataType)
<E extends EnumType> DataType<E> asEnumDataType(Class<E> enumDataType)
<U> DataType<U> asConvertedDataType(Converter<? super T,U> converter)
String getTypeName()
String getTypeName(Configuration configuration)
String getCastTypeName()
This is useful for some dialects that have specialised type names for cast expressions. Other dialects require type-length binding when casting, (e.g. VARCHAR(32767))
String getCastTypeName(Configuration configuration)
This is useful for some dialects that have specialised type names for cast expressions. Other dialects require type-length binding when casting, (e.g. VARCHAR(32767))
String getCastTypeName(Configuration configuration, int precision, int scale)
This is useful for some dialects that have specialised type names for cast expressions. Other dialects require type-length binding when casting, (e.g. DECIMAL(20,5))
SQLDialect getDialect()
SQLDialect
T convert(Object object)
<T>
object
- The object to be converted
RuntimeException
- An undisclosed unchecked exception, if
conversion fails.boolean isNumeric()
SQLDataType.TINYINT
SQLDataType.SMALLINT
SQLDataType.INTEGER
SQLDataType.BIGINT
SQLDataType.FLOAT
SQLDataType.DOUBLE
SQLDataType.REAL
SQLDataType.DECIMAL
SQLDataType.DECIMAL_INTEGER
SQLDataType.NUMERIC
boolean isString()
SQLDataType.CHAR
SQLDataType.CLOB
SQLDataType.LONGNVARCHAR
SQLDataType.LONGVARCHAR
SQLDataType.NCHAR
SQLDataType.NCLOB
SQLDataType.NVARCHAR
SQLDataType.VARCHAR
boolean isDateTime()
boolean isTemporal()
This is a combination of isDateTime()
or isInterval()
boolean isInterval()
boolean isBinary()
boolean isArray()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |