public abstract class AbstractDataType<T> extends Object implements DataType<T>
This also acts as a static data type registry for jOOQ internally.
This type is for JOOQ INTERNAL USE only. Do not reference directly
| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractDataType(SQLDialect dialect,
                SQLDataType<T> sqldatatype,
                Class<? extends T> type,
                String typeName) | 
| protected  | AbstractDataType(SQLDialect dialect,
                SQLDataType<T> sqldatatype,
                Class<? extends T> type,
                String typeName,
                boolean hasPrecisionAndScale) | 
| protected  | AbstractDataType(SQLDialect dialect,
                SQLDataType<T> sqldatatype,
                Class<? extends T> type,
                String typeName,
                String castTypeName) | 
| protected  | AbstractDataType(SQLDialect dialect,
                SQLDataType<T> sqlDataType,
                Class<? extends T> type,
                String typeName,
                String castTypeName,
                boolean hasPrecisionAndScale) | 
| Modifier and Type | Method and Description | 
|---|---|
| <A extends ArrayRecord<T>>  | asArrayDataType(Class<A> arrayDataType)Retrieve the data type for an Oracle-style ARRAY of this data type | 
| <U> DataType<U> | asConvertedDataType(Converter<? super T,U> converter)Retrieve the data type for a given converter | 
| <E extends EnumType>  | asEnumDataType(Class<E> enumDataType)Retrieve the data type for a given enum data type | 
| <M extends MasterDataType<T>>  | asMasterDataType(Class<M> masterDataType)Retrieve the data type for a given master data type | 
| List<T> | convert(Collection<?> objects)Convert an arbitrary set of objects into  <T> | 
| T[] | convert(Object... objects)Convert an arbitrary set of objects into  <T> | 
| T | convert(Object object)Convert an arbitrary object into  <T> | 
| boolean | equals(Object obj) | 
| 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 length)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. | 
| protected static <T> DataType<T> | getDataType(SQLDialect dialect,
           Class<? extends T> type) | 
| protected static DataType<?> | getDataType(SQLDialect dialect,
           String typeName) | 
| protected static DataType<Object> | getDefaultDataType(SQLDialect dialect,
                  String typeName) | 
| 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  Typesvalue | 
| 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 | 
| int | hashCode() | 
| 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 | isLob()Whether this data type is best deserialised as a  LOB. | 
| 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. | 
| String | toString() | 
protected AbstractDataType(SQLDialect dialect, SQLDataType<T> sqldatatype, Class<? extends T> type, String typeName)
protected AbstractDataType(SQLDialect dialect, SQLDataType<T> sqldatatype, Class<? extends T> type, String typeName, String castTypeName)
protected AbstractDataType(SQLDialect dialect, SQLDataType<T> sqldatatype, Class<? extends T> type, String typeName, boolean hasPrecisionAndScale)
protected AbstractDataType(SQLDialect dialect, SQLDataType<T> sqlDataType, Class<? extends T> type, String typeName, String castTypeName, boolean hasPrecisionAndScale)
public final SQLDataType<T> getSQLDataType()
DataTypegetSQLDataType in interface DataType<T>public final DataType<T> getDataType(Configuration configuration)
DataTypegetDataType in interface DataType<T>public int getSQLType()
DataTypeTypes valuegetSQLType in interface DataType<T>public final Class<? extends T> getType()
DataTypepublic final Class<?> getType(int precision, int scale)
DataTypepublic final Class<? extends T[]> getArrayType()
DataTypegetArrayType in interface DataType<T>public final String getTypeName()
DataTypegetTypeName in interface DataType<T>public String getTypeName(Configuration configuration)
DataTypegetTypeName in interface DataType<T>public final String getCastTypeName()
DataTypeThis 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))
getCastTypeName in interface DataType<T>public String getCastTypeName(Configuration configuration, int length)
DataTypeThis is useful for some dialects that have specialised type names for cast expressions. Other dialects require type-length binding when casting, (e.g. VARCHAR(20))
getCastTypeName in interface DataType<T>public String getCastTypeName(Configuration configuration, int precision, int scale)
DataTypeThis 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))
getCastTypeName in interface DataType<T>public String getCastTypeName(Configuration configuration)
DataTypeThis 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))
getCastTypeName in interface DataType<T>public final DataType<T[]> getArrayDataType()
DataTypegetArrayDataType in interface DataType<T>public final <A extends ArrayRecord<T>> DataType<A> asArrayDataType(Class<A> arrayDataType)
DataTypeasArrayDataType in interface DataType<T>public final <M extends MasterDataType<T>> DataType<M> asMasterDataType(Class<M> masterDataType)
DataTypeasMasterDataType in interface DataType<T>public final <E extends EnumType> DataType<E> asEnumDataType(Class<E> enumDataType)
DataTypeasEnumDataType in interface DataType<T>public final <U> DataType<U> asConvertedDataType(Converter<? super T,U> converter)
DataTypeasConvertedDataType in interface DataType<T>public final SQLDialect getDialect()
DataTypeSQLDialectgetDialect in interface DataType<T>public T convert(Object object)
DataType<T>public final T[] convert(Object... objects)
DataType<T>public final List<T> convert(Collection<?> objects)
DataType<T>protected static DataType<Object> getDefaultDataType(SQLDialect dialect, String typeName)
protected static DataType<?> getDataType(SQLDialect dialect, String typeName)
protected static <T> DataType<T> getDataType(SQLDialect dialect, Class<? extends T> type)
public final boolean isNumeric()
DataTypeThis applies to any of these types:
public final boolean isString()
DataTypeThis applies to any of these types:
public final boolean isDateTime()
DataTypeThis applies to any of these types.
isDateTime in interface DataType<T>public final boolean isTemporal()
DataTypeThis applies to any of these types.
 This is a combination of DataType.isDateTime() or DataType.isInterval()
isTemporal in interface DataType<T>public final boolean isInterval()
DataTypeThis applies to any of these types.
isInterval in interface DataType<T>public final boolean isLob()
DataTypeLOB.
 This applies to any of these types.
public final boolean isBinary()
DataTypeThis applies to any of these types.
public final boolean isArray()
DataTypeCopyright © 2013. All Rights Reserved.