|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jooq.impl.AbstractDataType<T>
public abstract class AbstractDataType<T>
A common base class for data types.
This also acts as a static data type registry for jOOQ internally.
This type is for JOOQ INTERNAL USE only. Do not reference directly
Constructor Summary | |
---|---|
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)
|
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> |
|
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 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
|
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 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 |
|
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 |
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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)
Method Detail |
---|
public final SQLDataType<T> getSQLDataType()
DataType
getSQLDataType
in interface DataType<T>
public final DataType<T> getDataType(Configuration configuration)
DataType
getDataType
in interface DataType<T>
public int getSQLType()
DataType
Types
value
getSQLType
in interface DataType<T>
public final Class<? extends T> getType()
DataType
getType
in interface DataType<T>
public final Class<?> getType(int precision, int scale)
DataType
getType
in interface DataType<T>
public final Class<? extends T[]> getArrayType()
DataType
getArrayType
in interface DataType<T>
public final String getTypeName()
DataType
getTypeName
in interface DataType<T>
public String getTypeName(Configuration configuration)
DataType
getTypeName
in interface DataType<T>
public final String getCastTypeName()
DataType
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))
getCastTypeName
in interface DataType<T>
public String getCastTypeName(Configuration configuration, int precision, int scale)
DataType
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))
getCastTypeName
in interface DataType<T>
public String getCastTypeName(Configuration configuration)
DataType
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))
getCastTypeName
in interface DataType<T>
public final DataType<T[]> getArrayDataType()
DataType
getArrayDataType
in interface DataType<T>
public final <A extends ArrayRecord<T>> DataType<A> asArrayDataType(Class<A> arrayDataType)
DataType
asArrayDataType
in interface DataType<T>
public final <M extends MasterDataType<T>> DataType<M> asMasterDataType(Class<M> masterDataType)
DataType
asMasterDataType
in interface DataType<T>
public final <E extends EnumType> DataType<E> asEnumDataType(Class<E> enumDataType)
DataType
asEnumDataType
in interface DataType<T>
public final <U> DataType<U> asConvertedDataType(Converter<? super T,U> converter)
DataType
asConvertedDataType
in interface DataType<T>
public final SQLDialect getDialect()
DataType
SQLDialect
getDialect
in interface DataType<T>
public T convert(Object object)
DataType
<T>
convert
in interface DataType<T>
object
- The object to be converted
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()
DataType
SQLDataType.TINYINT
SQLDataType.SMALLINT
SQLDataType.INTEGER
SQLDataType.BIGINT
SQLDataType.FLOAT
SQLDataType.DOUBLE
SQLDataType.REAL
SQLDataType.DECIMAL
SQLDataType.DECIMAL_INTEGER
SQLDataType.NUMERIC
isNumeric
in interface DataType<T>
public final boolean isString()
DataType
SQLDataType.CHAR
SQLDataType.CLOB
SQLDataType.LONGNVARCHAR
SQLDataType.LONGVARCHAR
SQLDataType.NCHAR
SQLDataType.NCLOB
SQLDataType.NVARCHAR
SQLDataType.VARCHAR
isString
in interface DataType<T>
public final boolean isDateTime()
DataType
isDateTime
in interface DataType<T>
public final boolean isTemporal()
DataType
This is a combination of DataType.isDateTime()
or DataType.isInterval()
isTemporal
in interface DataType<T>
public final boolean isInterval()
DataType
isInterval
in interface DataType<T>
public final boolean isBinary()
DataType
isBinary
in interface DataType<T>
public final boolean isArray()
DataType
isArray
in interface DataType<T>
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |