T
- The Java type associated with this SQL data typepublic interface DataType<T>
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
<A extends ArrayRecord<?>> |
asArrayDataType(java.lang.Class<A> arrayDataType)
Retrieve the data type for an Oracle-style ARRAY of this data type.
|
<U> DataType<U> |
asConvertedDataType(Binding<? super T,U> binding)
Retrieve the data type for a given binding.
|
<U> DataType<U> |
asConvertedDataType(Converter<? super T,U> converter)
Retrieve the data type for a given converter.
|
<E extends EnumType> |
asEnumDataType(java.lang.Class<E> enumDataType)
Retrieve the data type for a given enum data type.
|
java.util.List<T> |
convert(java.util.Collection<?> objects)
Convert an arbitrary set of objects into
<T> . |
T[] |
convert(java.lang.Object... objects)
Convert an arbitrary set of objects into
<T> . |
T |
convert(java.lang.Object object)
Convert an arbitrary object into
<T> . |
boolean |
defaulted()
Get the defaultability of this data type.
|
DataType<T> |
defaulted(boolean defaulted)
Return a new data type like this, with a new defaultability.
|
DataType<T[]> |
getArrayDataType()
Retrieve the data type for an ARRAY of this data type.
|
java.lang.Class<T[]> |
getArrayType()
Retrieve the Java type associated with ARRAYs of this data type.
|
Binding<?,T> |
getBinding()
Get the data type binding associated with this data type.
|
java.lang.String |
getCastTypeName()
Retrieve the dialect-specific type name associated with this data type
used for casting.
|
java.lang.String |
getCastTypeName(Configuration configuration)
Retrieve the dialect-specific type name associated with this data type
used for casting.
|
Converter<?,T> |
getConverter()
Get the converter associated with this data type.
|
DataType<T> |
getDataType(Configuration configuration)
The dialect-specific data type representing this data type.
|
SQLDialect |
getDialect()
Retrieve the underlying
SQLDialect . |
DataType<T> |
getSQLDataType()
Get the standard SQL data type of this (dialect-specific) data type if
available.
|
int |
getSQLType()
Get JDBC
Types value. |
java.lang.Class<T> |
getType()
Retrieve the Java type associated with this data type.
|
java.lang.String |
getTypeName()
Retrieve the dialect-specific type name associated with this data type.
|
java.lang.String |
getTypeName(Configuration configuration)
Retrieve the dialect-specific type name associated with this data type.
|
boolean |
hasLength()
Whether this data type has a length.
|
boolean |
hasPrecision()
Whether this data type has a precision.
|
boolean |
hasScale()
Whether this data type has a scale.
|
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.
|
int |
length()
Get the length of this data type.
|
DataType<T> |
length(int length)
Return a new data type like this, with a new length value.
|
boolean |
nullable()
Get the nullability of this data type.
|
DataType<T> |
nullable(boolean nullable)
Return a new data type like this, with a new nullability.
|
int |
precision()
Get the precision of this data type.
|
DataType<T> |
precision(int precision)
Return a new data type like this, with a new precision value.
|
DataType<T> |
precision(int precision,
int scale)
Return a new data type like this, with a new precision and scale value.
|
int |
scale()
Get the scale of this data type.
|
DataType<T> |
scale(int scale)
Return a new data type like this, with a new scale value.
|
DataType<T> getSQLDataType()
DataType<T> getDataType(Configuration configuration)
int getSQLType()
Types
value.java.lang.Class<T> getType()
java.lang.Class<T[]> getArrayType()
DataType<T[]> getArrayDataType()
<A extends ArrayRecord<?>> DataType<A> asArrayDataType(java.lang.Class<A> arrayDataType)
<E extends EnumType> DataType<E> asEnumDataType(java.lang.Class<E> enumDataType)
<U> DataType<U> asConvertedDataType(Converter<? super T,U> converter)
<U> DataType<U> asConvertedDataType(Binding<? super T,U> binding)
java.lang.String getTypeName()
java.lang.String getTypeName(Configuration configuration)
java.lang.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))
java.lang.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))
SQLDialect getDialect()
SQLDialect
.T convert(java.lang.Object object)
<T>
.object
- The object to be convertedDataTypeException
- If conversion fails.T[] convert(java.lang.Object... objects)
<T>
.objects
- The objects to be convertedDataTypeException
- If conversion fails.java.util.List<T> convert(java.util.Collection<?> objects)
<T>
.objects
- The objects to be convertedDataTypeException
- If conversion fails.DataType<T> nullable(boolean nullable)
nullable
- The new nullabilityboolean nullable()
DataType<T> defaulted(boolean defaulted)
defaulted
- The new defaultabilityboolean defaulted()
DataType<T> precision(int precision)
This will have no effect if hasPrecision()
is false
This is the same as calling precision(int, int)
with
scale == 0
precision
- The new precision valueDataType<T> precision(int precision, int scale)
This will have no effect if hasPrecision()
is false
, or if scale > 0
and hasScale()
is
false
precision
- The new precision valuescale
- The new scale valueint precision()
boolean hasPrecision()
DataType<T> scale(int scale)
This will have no effect if hasScale()
is false
scale
- The new scale valueint scale()
boolean hasScale()
DataType<T> length(int length)
This will have no effect if hasLength()
is false
length
- The new length valueint length()
boolean hasLength()
boolean isNumeric()
This applies to any of these types:
boolean isString()
This applies to any of these types:
boolean isDateTime()
This applies to any of these types.
boolean isTemporal()
This applies to any of these types.
This is a combination of isDateTime()
or isInterval()
boolean isInterval()
This applies to any of these types.
boolean isBinary()
This applies to any of these types.
boolean isLob()
LOB
.
This applies to any of these types.
boolean isArray()
Copyright © 2015. All Rights Reserved.