- java.lang.Object
-
- org.jooq.impl.DefaultDataType<T>
-
- All Implemented Interfaces:
Serializable,DataType<T>,Named,QueryPart,QueryPartInternal
@Internal public class DefaultDataType<T> extends Object
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
- Author:
- Lukas Eder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultDataType(SQLDialect dialect, Class<T> type, String typeName)DefaultDataType(SQLDialect dialect, Class<T> type, String typeName, String castTypeName)DefaultDataType(SQLDialect dialect, DataType<T> sqlDataType, String typeName)DefaultDataType(SQLDialect dialect, DataType<T> sqlDataType, String typeName, String castTypeName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaccept(Context<?> ctx)<A extends ArrayRecord<?>>
DataType<A>asArrayDataType(Class<A> arrayDataType)Retrieve the data type for an Oracle-style ARRAY of this data type.<U> DataType<U>asConvertedDataType(Binding<? super T,U> newBinding)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>
DataType<E>asEnumDataType(Class<E> enumDataType)Retrieve the data type for a given enum data type.voidbind(BindContext context)Deprecated.- 3.4.0 - [#2694] - UseQueryPartInternal.accept(Context)instead.CharacterSetcharacterSet()Get the character set of this data type, ornullif there is no character set, or if the default character set applies.DataType<T>characterSet(CharacterSet c)Return a new data type like this, with a new character set.Clause[]clauses(Context<?> ctx)Deprecated.- 3.11.0 - [#8179] - This functionality will be removed in the future.Collationcollation()Get the collation of this data type, ornullif there is no collation, or if the default collation applies.DataType<T>collation(Collation c)Return a new data type like this, with a new collation.Tconvert(Object object)Convert an arbitrary object into<T>.T[]convert(Object... objects)Convert an arbitrary set of objects into<T>.List<T>convert(Collection<?> objects)Convert an arbitrary set of objects into<T>.protected DSLContextcreate()Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()andConfiguration.dsl()instead.protected DSLContextcreate(Configuration configuration)Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()andConfiguration.dsl()instead.protected DSLContextcreate(Context<?> ctx)Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()andConfiguration.dsl()instead.booleandeclaresCTE()Subclasses may override thisbooleandeclaresFields()Subclasses may override thisbooleandeclaresTables()Subclasses may override thisbooleandeclaresWindows()Subclasses may override thisField<T>default_()The expression to be applied as theDEFAULTvalue for this data type.DataType<T>default_(Field<T> d)Specify an expression to be applied as theDEFAULTvalue for this data type.DataType<T>default_(T d)Specify an expression to be applied as theDEFAULTvalue for this data type.booleandefaulted()Get the defaultability of this data type.DataType<T>defaulted(boolean d)Deprecated.Field<T>defaultValue()The expression to be applied as theDEFAULTvalue for this data type.DataType<T>defaultValue(Field<T> d)Specify an expression to be applied as theDEFAULTvalue for this data type.DataType<T>defaultValue(T d)Specify an expression to be applied as theDEFAULTvalue for this data type.booleanequals(Object obj)Check whether thisQueryPartcan be considered equal to anotherQueryPart.booleangeneratesCast()Subclasses may override thisDataType<?>getArrayComponentDataType()Retrieve the Java component data type if this is an ARRAY type, ornull, otherwise.Class<?>getArrayComponentType()Retrieve the Java component type if this is an ARRAY type, ornull, otherwise.DataType<T[]>getArrayDataType()Retrieve the data type for an ARRAY of this data type.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.StringgetCastTypeName()Retrieve the dialect-specific type name associated with this data type used for casting.StringgetCastTypeName(Configuration configuration)Retrieve the dialect-specific type name associated with this data type used for casting.StringgetComment()The comment on this object.CommentgetCommentPart()The comment on this object as aQueryPart.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.static <T> DataType<T>getDataType(SQLDialect dialect, Class<T> type)static <T> DataType<T>getDataType(SQLDialect dialect, Class<T> type, DataType<T> fallbackDataType)static DataType<?>getDataType(SQLDialect dialect, String typeName)static DataType<?>getDataType(SQLDialect dialect, String t, int p, int s)Convert a type name (using precision and scale) into a Java classstatic DataType<?>getDataType(SQLDialect dialect, String t, int p, int s, boolean forceIntegerTypesOnZeroScaleDecimals)Convert a type name (using precision and scale) into a Java classstatic DataType<Object>getDefaultDataType(String typeName)static DataType<Object>getDefaultDataType(SQLDialect dialect, String typeName)SQLDialectgetDialect()Retrieve the underlyingSQLDialect.Domain<T>getDomain()Get the defining DOMAIN type orNULLif there is no such type.StringgetName()The unqualified name of this object.NamegetQualifiedName()The qualified name of this object.DataType<T>getSQLDataType()Get the standard SQL data type of this (dialect-specific) data type if available.intgetSQLType()Get JDBCTypesvalue.intgetSQLType(Configuration configuration)Get the dialect-specific JDBCTypesvalue.Class<T>getType()Retrieve the Java type associated with this data type.static Class<?>getType(SQLDialect dialect, String t, int p, int s)Convert a type name (using precision and scale) into a Java classStringgetTypeName()Retrieve the dialect-specific type name associated with this data type.StringgetTypeName(Configuration configuration)Retrieve the dialect-specific type name associated with this data type.NamegetUnqualifiedName()The unqualified name of this object.inthashCode()Generate a hash code from thisQueryPart.booleanhasLength()Whether this data type has a length.booleanhasPrecision()Whether this data type has a precision.booleanhasScale()Whether this data type has a scale.booleanidentity()Get the identity flag of this data type.DataType<T>identity(boolean i)Return a new data type like this, with a new identity flag.booleanisArray()Whether this data type is an array type.booleanisBinary()Whether this data type is any binary type.booleanisDate()Whether this data type is any date type.booleanisDateTime()Whether this data type is any date or time type.booleanisEmbeddable()Whether this data type is an embeddable type.booleanisEnum()Whether this data type is an enum type.booleanisInteger()Whether this data type is any integer data type.booleanisInterval()Whether this data type is any interval type.booleanisJSON()Whether this data type is a JSON type.booleanisLob()Whether this data type is best deserialised as aLOB.booleanisNString()Whether this data type is any national character data type.booleanisNumeric()Whether this data type is any numeric data type.booleanisString()Whether this data type is any character data type.booleanisTemporal()Whether this data type is any date or time type.booleanisTime()Whether this data type is any time type.booleanisTimestamp()Whether this data type is any timestamp type.booleanisUDT()Whether this data type is a UDT type.booleanisXML()Whether this data type is an XML type.intlength()Get the length of this data type.DataType<T>length(int l)Return a new data type like this, with a new length value.booleanlengthDefined()Whether the precision returned byDataType.length()is defined.static Stringnormalise(String typeName)Nullabilitynullability()Get the nullability of this data type.DataType<T>nullability(Nullability n)Return a new data type like this, with a new nullability.booleannullable()Get the nullability of this data type.DataType<T>nullable(boolean n)Return a new data type like this, with a new nullability.intprecision()Get the precision of this data type.DataType<T>precision(int p)Return a new data type like this, with a new precision value.DataType<T>precision(int p, int s)Return a new data type like this, with a new precision and scale value.booleanprecisionDefined()Whether the precision returned byDataType.precision()is defined.booleanrendersContent(Context<?> ctx)Subclasses may override thisintscale()Get the scale of this data type.DataType<T>scale(int s)Return a new data type like this, with a new scale value.booleanscaleDefined()Whether the precision returned byDataType.scale()is defined.voidtoSQL(RenderContext context)Deprecated.- 3.4.0 - [#2694] - UseQueryPartInternal.accept(Context)instead.StringtoString()Render a SQL string representation of thisQueryPart.protected DataAccessExceptiontranslate(String sql, SQLException e)Internal convenience method-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jooq.DataType
asConvertedDataType
-
Methods inherited from interface org.jooq.Named
getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
-
-
-
-
Constructor Detail
-
DefaultDataType
public DefaultDataType(SQLDialect dialect, DataType<T> sqlDataType, String typeName)
-
DefaultDataType
public DefaultDataType(SQLDialect dialect, DataType<T> sqlDataType, String typeName, String castTypeName)
-
DefaultDataType
public DefaultDataType(SQLDialect dialect, Class<T> type, String typeName)
-
DefaultDataType
public DefaultDataType(SQLDialect dialect, Class<T> type, String typeName, String castTypeName)
-
-
Method Detail
-
nullability
public final Nullability nullability()
Description copied from interface:DataTypeGet the nullability of this data type.- Returns:
- The nullability
-
collation
public final Collation collation()
Description copied from interface:DataTypeGet the collation of this data type, ornullif there is no collation, or if the default collation applies.
-
characterSet
public final CharacterSet characterSet()
Description copied from interface:DataTypeGet the character set of this data type, ornullif there is no character set, or if the default character set applies.
-
identity
public final boolean identity()
Description copied from interface:DataTypeGet the identity flag of this data type.- Returns:
- The identity flag.
-
default_
public final Field<T> default_()
Description copied from interface:DataTypeThe expression to be applied as theDEFAULTvalue for this data type.- Returns:
- The default value if present, or
nullif no default value is specified for this data type. - See Also:
DataType.defaultValue(Field)
-
getSQLDataType
public final DataType<T> getSQLDataType()
Description copied from interface:DataTypeGet the standard SQL data type of this (dialect-specific) data type if available.
-
getDataType
public final DataType<T> getDataType(Configuration configuration)
Description copied from interface:DataTypeThe dialect-specific data type representing this data type.
-
getType
public final Class<T> getType()
Description copied from interface:DataTypeRetrieve the Java type associated with this data type.
-
getBinding
public final Binding<?,T> getBinding()
Description copied from interface:DataTypeGet the data type binding associated with this data type.
-
getDialect
public final SQLDialect getDialect()
Description copied from interface:DataTypeRetrieve the underlyingSQLDialect.
-
getDefaultDataType
public static final DataType<Object> getDefaultDataType(SQLDialect dialect, String typeName)
-
getDataType
public static final DataType<?> getDataType(SQLDialect dialect, String typeName)
-
getDataType
public static final <T> DataType<T> getDataType(SQLDialect dialect, Class<T> type)
-
getDataType
public static final <T> DataType<T> getDataType(SQLDialect dialect, Class<T> type, DataType<T> fallbackDataType)
-
normalise
public static final String normalise(String typeName)
- Returns:
- The type name without all special characters and white spaces
-
getDataType
public static final DataType<?> getDataType(SQLDialect dialect, String t, int p, int s) throws SQLDialectNotSupportedException
Convert a type name (using precision and scale) into a Java class- Throws:
SQLDialectNotSupportedException
-
getDataType
public static final DataType<?> getDataType(SQLDialect dialect, String t, int p, int s, boolean forceIntegerTypesOnZeroScaleDecimals) throws SQLDialectNotSupportedException
Convert a type name (using precision and scale) into a Java class- Throws:
SQLDialectNotSupportedException
-
getType
public static final Class<?> getType(SQLDialect dialect, String t, int p, int s) throws SQLDialectNotSupportedException
Convert a type name (using precision and scale) into a Java class- Throws:
SQLDialectNotSupportedException
-
nullability
public final DataType<T> nullability(Nullability n)
Description copied from interface:DataTypeReturn a new data type like this, with a new nullability.[#5709] A
nullablecolumn cannot have anDataType.identity().- Specified by:
nullabilityin interfaceDataType<T>- Parameters:
n- The new nullability- Returns:
- The new data type
-
nullable
public final DataType<T> nullable(boolean n)
Description copied from interface:DataTypeReturn a new data type like this, with a new nullability.This is the same as calling
DataType.nullability(Nullability)with any ofNullability.NULLorNullability.NOT_NULLas an argument.[#5709] A
nullablecolumn cannot have anDataType.identity().
-
nullable
public final boolean nullable()
Description copied from interface:DataTypeGet the nullability of this data type.This returns
trueby default, i.e. ifDataType.nullability()isNullability.DEFAULT.
-
collation
public final DataType<T> collation(Collation c)
Description copied from interface:DataTypeReturn a new data type like this, with a new collation.
-
characterSet
public final DataType<T> characterSet(CharacterSet c)
Description copied from interface:DataTypeReturn a new data type like this, with a new character set.- Specified by:
characterSetin interfaceDataType<T>
-
identity
public final DataType<T> identity(boolean i)
Description copied from interface:DataTypeReturn a new data type like this, with a new identity flag.[#5709] The IDENTITY flag imposes a NOT NULL constraint, and removes all DEFAULT values.
-
defaultValue
public final DataType<T> defaultValue(T d)
Description copied from interface:DataTypeSpecify an expression to be applied as theDEFAULTvalue for this data type.[#5709] A
defaultedcolumn cannot have anDataType.identity().This is an alias for
DataType.default_(Object).- Specified by:
defaultValuein interfaceDataType<T>- See Also:
DataType.defaultValue(Field)
-
defaultValue
public final DataType<T> defaultValue(Field<T> d)
Description copied from interface:DataTypeSpecify an expression to be applied as theDEFAULTvalue for this data type.A default value of a data type applies to DDL statements, such as
CREATE TABLEALTER TABLE
The distinct types of possible
DEFAULTexpressions is defined by the underlying database. Please refer to your database manual to learn what expressions are possible.This is an alias for
DataType.default_(Field).- Specified by:
defaultValuein interfaceDataType<T>
-
defaultValue
public final Field<T> defaultValue()
Description copied from interface:DataTypeThe expression to be applied as theDEFAULTvalue for this data type.This is an alias for
DataType.default_().- Specified by:
defaultValuein interfaceDataType<T>- Returns:
- The default value if present, or
nullif no default value is specified for this data type. - See Also:
DataType.defaultValue(Field)
-
default_
public final DataType<T> default_(T d)
Description copied from interface:DataTypeSpecify an expression to be applied as theDEFAULTvalue for this data type.[#5709] A
defaultedcolumn cannot have anDataType.identity().- Specified by:
default_in interfaceDataType<T>- See Also:
DataType.defaultValue(Field)
-
default_
public final DataType<T> default_(Field<T> d)
Description copied from interface:DataTypeSpecify an expression to be applied as theDEFAULTvalue for this data type.A default value of a data type applies to DDL statements, such as
CREATE TABLEALTER TABLE
The distinct types of possible
DEFAULTexpressions is defined by the underlying database. Please refer to your database manual to learn what expressions are possible.
-
defaulted
@Deprecated public final DataType<T> defaulted(boolean d)
Deprecated.Description copied from interface:DataTypeReturn a new data type like this, with a new defaultability.
-
defaulted
public final boolean defaulted()
Description copied from interface:DataTypeGet the defaultability of this data type.
-
precision
public final int precision()
Description copied from interface:DataTypeGet the precision of this data type.
-
precision
public final DataType<T> precision(int p)
Description copied from interface:DataTypeReturn a new data type like this, with a new precision value.This will have no effect if
DataType.hasPrecision()isfalseThis is the same as calling
DataType.precision(int, int)withscale == 0
-
precision
public final DataType<T> precision(int p, int s)
Description copied from interface:DataTypeReturn a new data type like this, with a new precision and scale value.This will have no effect if
DataType.hasPrecision()isfalse, or ifscale > 0andDataType.hasScale()isfalse
-
hasPrecision
public final boolean hasPrecision()
Description copied from interface:DataTypeWhether this data type has a precision.- Specified by:
hasPrecisionin interfaceDataType<T>- Returns:
- Whether this data type has a precision
-
precisionDefined
public final boolean precisionDefined()
Description copied from interface:DataTypeWhether the precision returned byDataType.precision()is defined.The default precision is
0for all data types. If a data type does not have a precision (seeDataType.hasPrecision()), or if it was initialised without precision (e.g.SQLDataType.TIMESTAMP), then the precision is not defined.- Specified by:
precisionDefinedin interfaceDataType<T>
-
scale
public final int scale()
Description copied from interface:DataTypeGet the scale of this data type.
-
scale
public final DataType<T> scale(int s)
Description copied from interface:DataTypeReturn a new data type like this, with a new scale value.This will have no effect if
DataType.hasScale()isfalse
-
hasScale
public final boolean hasScale()
Description copied from interface:DataTypeWhether this data type has a scale.
-
scaleDefined
public final boolean scaleDefined()
Description copied from interface:DataTypeWhether the precision returned byDataType.scale()is defined.The default scale is
0for all data types. If a data type does not have a scale (seeDataType.hasScale()), or if it was initialised without scale (e.g.SQLDataType.TIMESTAMP), then the scale is not defined.- Specified by:
scaleDefinedin interfaceDataType<T>
-
length
public final DataType<T> length(int l)
Description copied from interface:DataTypeReturn a new data type like this, with a new length value.This will have no effect if
DataType.hasLength()isfalse
-
length
public final int length()
Description copied from interface:DataTypeGet the length of this data type.
-
hasLength
public final boolean hasLength()
Description copied from interface:DataTypeWhether this data type has a length.
-
lengthDefined
public final boolean lengthDefined()
Description copied from interface:DataTypeWhether the precision returned byDataType.length()is defined.The default length is
0for all data types. If a data type does not have a length (seeDataType.hasLength()), or if it was initialised without length (e.g.SQLDataType.TIMESTAMP), then the length is not defined.- Specified by:
lengthDefinedin interfaceDataType<T>
-
getSQLType
public int getSQLType()
Description copied from interface:DataTypeGet JDBCTypesvalue.- Specified by:
getSQLTypein interfaceDataType<T>
-
getSQLType
public final int getSQLType(Configuration configuration)
Description copied from interface:DataTypeGet the dialect-specific JDBCTypesvalue.- Specified by:
getSQLTypein interfaceDataType<T>
-
getDomain
public Domain<T> getDomain()
Description copied from interface:DataTypeGet the defining DOMAIN type orNULLif there is no such type.
-
getConverter
public final Converter<?,T> getConverter()
Description copied from interface:DataTypeGet the converter associated with this data type.- Specified by:
getConverterin interfaceDataType<T>
-
getTypeName
public final String getTypeName()
Description copied from interface:DataTypeRetrieve the dialect-specific type name associated with this data type.- Specified by:
getTypeNamein interfaceDataType<T>
-
getTypeName
public String getTypeName(Configuration configuration)
Description copied from interface:DataTypeRetrieve the dialect-specific type name associated with this data type.- Specified by:
getTypeNamein interfaceDataType<T>
-
getCastTypeName
public final String getCastTypeName()
Description copied from interface:DataTypeRetrieve 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. Other dialects require type-length binding when casting, (e.g. VARCHAR(32767))
- Specified by:
getCastTypeNamein interfaceDataType<T>
-
getCastTypeName
public String getCastTypeName(Configuration configuration)
Description copied from interface:DataTypeRetrieve 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. Other dialects require type-length binding when casting, (e.g. VARCHAR(32767))
- Specified by:
getCastTypeNamein interfaceDataType<T>
-
getArrayType
public final Class<T[]> getArrayType()
Description copied from interface:DataTypeRetrieve the Java type associated with ARRAYs of this data type.- Specified by:
getArrayTypein interfaceDataType<T>
-
getArrayDataType
public final DataType<T[]> getArrayDataType()
Description copied from interface:DataTypeRetrieve the data type for an ARRAY of this data type.- Specified by:
getArrayDataTypein interfaceDataType<T>
-
getArrayComponentType
public Class<?> getArrayComponentType()
Description copied from interface:DataTypeRetrieve the Java component type if this is an ARRAY type, ornull, otherwise.- Specified by:
getArrayComponentTypein interfaceDataType<T>
-
getArrayComponentDataType
public DataType<?> getArrayComponentDataType()
Description copied from interface:DataTypeRetrieve the Java component data type if this is an ARRAY type, ornull, otherwise.- Specified by:
getArrayComponentDataTypein interfaceDataType<T>
-
asArrayDataType
@Pro public final <A extends ArrayRecord<?>> DataType<A> asArrayDataType(Class<A> arrayDataType)
Description copied from interface:DataTypeRetrieve the data type for an Oracle-style ARRAY of this data type.- Specified by:
asArrayDataTypein interfaceDataType<T>
-
asEnumDataType
public final <E extends EnumType> DataType<E> asEnumDataType(Class<E> enumDataType)
Description copied from interface:DataTypeRetrieve the data type for a given enum data type.- Specified by:
asEnumDataTypein interfaceDataType<T>
-
asConvertedDataType
public <U> DataType<U> asConvertedDataType(Converter<? super T,U> converter)
Description copied from interface:DataTypeRetrieve the data type for a given converter.- Specified by:
asConvertedDataTypein interfaceDataType<T>
-
asConvertedDataType
public <U> DataType<U> asConvertedDataType(Binding<? super T,U> newBinding)
Description copied from interface:DataTypeRetrieve the data type for a given binding.- Specified by:
asConvertedDataTypein interfaceDataType<T>
-
convert
public T convert(Object object)
Description copied from interface:DataTypeConvert an arbitrary object into<T>.See
Convert.convert(Object, Class)for details about conversion rules. Notice this does not pass through anyConfiguration.converterProvider().
-
convert
public final T[] convert(Object... objects)
Description copied from interface:DataTypeConvert an arbitrary set of objects into<T>.See
Convert.convert(Object, Class)for details about conversion rules. Notice this does not pass through anyConfiguration.converterProvider().
-
convert
public final List<T> convert(Collection<?> objects)
Description copied from interface:DataTypeConvert an arbitrary set of objects into<T>.See
Convert.convert(Object, Class)for details about conversion rules. Notice this does not pass through anyConfiguration.converterProvider().
-
isNumeric
public final boolean isNumeric()
Description copied from interface:DataTypeWhether this data type is any numeric data type.This applies to any of these types:
- Specified by:
isNumericin interfaceDataType<T>- See Also:
DataType.isNumeric()
-
isInteger
public final boolean isInteger()
Description copied from interface:DataTypeWhether this data type is any integer data type.This applies to any of these types:
-
isString
public final boolean isString()
Description copied from interface:DataTypeWhether this data type is any character data type.This applies to any of these types:
-
isNString
public final boolean isNString()
Description copied from interface:DataTypeWhether this data type is any national character data type.This applies to any of these types:
-
isDateTime
public final boolean isDateTime()
Description copied from interface:DataTypeWhether this data type is any date or time type.This applies to any of these types.
- Specified by:
isDateTimein interfaceDataType<T>- See Also:
DataType.isDate()
-
isDate
public final boolean isDate()
Description copied from interface:DataTypeWhether this data type is any date type.This applies to any of these types.
-
isTimestamp
public final boolean isTimestamp()
Description copied from interface:DataTypeWhether this data type is any timestamp type.This applies to any of these types.
- Specified by:
isTimestampin interfaceDataType<T>
-
isTime
public final boolean isTime()
Description copied from interface:DataTypeWhether this data type is any time type.This applies to any of these types.
-
isTemporal
public final boolean isTemporal()
Description copied from interface:DataTypeWhether this data type is any date or time type.This applies to any of these types.
-
SQLDataType.DATE -
SQLDataType.TIME -
SQLDataType.TIMESTAMP -
SQLDataType.LOCALDATE -
SQLDataType.LOCALTIME -
SQLDataType.LOCALDATETIME -
SQLDataType.OFFSETTIME -
SQLDataType.OFFSETDATETIME -
YearToSecond -
YearToMonth -
DayToSecond
This is a combination of
DataType.isDateTime()orDataType.isInterval()- Specified by:
isTemporalin interfaceDataType<T>
-
-
isInterval
public final boolean isInterval()
Description copied from interface:DataTypeWhether this data type is any interval type.This applies to any of these types.
- Specified by:
isIntervalin interfaceDataType<T>
-
isLob
public final boolean isLob()
Description copied from interface:DataTypeWhether this data type is best deserialised as aLOB.This applies to any of these types.
-
isBinary
public final boolean isBinary()
Description copied from interface:DataTypeWhether this data type is any binary type.This applies to any of these types.
-
isArray
public final boolean isArray()
Description copied from interface:DataTypeWhether this data type is an array type.
-
isEmbeddable
public final boolean isEmbeddable()
Description copied from interface:DataTypeWhether this data type is an embeddable type.- Specified by:
isEmbeddablein interfaceDataType<T>
-
isUDT
public final boolean isUDT()
Description copied from interface:DataTypeWhether this data type is a UDT type.
-
isEnum
public final boolean isEnum()
Description copied from interface:DataTypeWhether this data type is an enum type.
-
isJSON
public final boolean isJSON()
Description copied from interface:DataTypeWhether this data type is a JSON type.
-
isXML
public final boolean isXML()
Description copied from interface:DataTypeWhether this data type is an XML type.
-
accept
public final void accept(Context<?> ctx)
Description copied from interface:QueryPartInternalThisQueryPartcanacceptaContextobject in order to render a SQL string or to bind its variables.- Specified by:
acceptin interfaceQueryPartInternal
-
toString
public String toString()
Description copied from interface:QueryPartRender a SQL string representation of thisQueryPart.For improved debugging, this renders a SQL string of this
QueryPartwith inlined bind variables. If thisQueryPartisAttachable, then the attachedConfigurationmay be used for rendering the SQL string, includingSQLDialectandSettings. Do note that mostQueryPartinstances are not attached to aConfiguration, and thus there is no guarantee that the SQL string will make sense in the context of a specific database.
-
hashCode
public int hashCode()
Description copied from interface:QueryPartGenerate a hash code from thisQueryPart.In general,
QueryParthash codes are the same as the hash codes generated fromQueryPart.toString(). This guarantees consistent behaviour withQueryPart.equals(Object)Some
QueryPartimplementations may choose to override this behaviour for improved performance, asQueryPart.toString()is an expensive operation, if called many times.
-
equals
public boolean equals(Object obj)
Description copied from interface:QueryPartCheck whether thisQueryPartcan be considered equal to anotherQueryPart.In general,
QueryPartequality is defined in terms ofQueryPart.toString()equality. In other words, two query parts are considered equal if their rendered SQL (with inlined bind variables) is equal. This means that the two query parts do not necessarily have to be of the same type.Some
QueryPartimplementations may choose to override this behaviour for improved performance, asQueryPart.toString()is an expensive operation, if called many times.
-
getName
public final String getName()
Description copied from interface:NamedThe unqualified name of this object.
-
getQualifiedName
public Name getQualifiedName()
Description copied from interface:NamedThe qualified name of this object.- Specified by:
getQualifiedNamein interfaceNamed
-
getUnqualifiedName
public final Name getUnqualifiedName()
Description copied from interface:NamedThe unqualified name of this object.- Specified by:
getUnqualifiedNamein interfaceNamed
-
getComment
public final String getComment()
Description copied from interface:NamedThe comment on this object.This is the same as calling
Named.getCommentPart()and thenComment.getComment().- Specified by:
getCommentin interfaceNamed
-
getCommentPart
public final Comment getCommentPart()
Description copied from interface:NamedThe comment on this object as aQueryPart.- Specified by:
getCommentPartin interfaceNamed
-
toSQL
@Deprecated public final void toSQL(RenderContext context)
Deprecated.- 3.4.0 - [#2694] - UseQueryPartInternal.accept(Context)instead.Description copied from interface:QueryPartInternalRender thisQueryPartto a SQL string contained incontext.sql(). Thecontextwill contain additional information about how to render thisQueryPart, e.g. whether thisQueryPartshould be rendered as a declaration or reference, whether thisQueryPart's contained bind variables should be inlined or replaced by'?', etc.- Specified by:
toSQLin interfaceQueryPartInternal
-
bind
@Deprecated public final void bind(BindContext context) throws DataAccessException
Deprecated.- 3.4.0 - [#2694] - UseQueryPartInternal.accept(Context)instead.Description copied from interface:QueryPartInternalBind all parameters of thisQueryPartto a PreparedStatementThis method is for JOOQ INTERNAL USE only. Do not reference directly
- Specified by:
bindin interfaceQueryPartInternal- Parameters:
context- The context holding the next bind index and other information for variable binding- Throws:
DataAccessException- If something went wrong while binding a variable
-
clauses
@Deprecated public Clause[] clauses(Context<?> ctx)
Deprecated.- 3.11.0 - [#8179] - This functionality will be removed in the future.Description copied from interface:QueryPartInternalTheClauses that are represented by this query part.QueryParts can specify severalClauses for which an event will be emittedbefore(in forward order) andafter(in reverse order) visiting the the query part throughContext.visit(QueryPart)This method is for JOOQ INTERNAL USE only. Do not reference directly
- Specified by:
clausesin interfaceQueryPartInternal- Returns:
- The
Clauses represented by this query part ornullor an empty array if this query part does not represent a clause.
-
rendersContent
public boolean rendersContent(Context<?> ctx)
Subclasses may override this- Specified by:
rendersContentin interfaceQueryPartInternal
-
declaresFields
public boolean declaresFields()
Subclasses may override this- Specified by:
declaresFieldsin interfaceQueryPartInternal
-
declaresTables
public boolean declaresTables()
Subclasses may override this- Specified by:
declaresTablesin interfaceQueryPartInternal
-
declaresWindows
public boolean declaresWindows()
Subclasses may override this- Specified by:
declaresWindowsin interfaceQueryPartInternal
-
declaresCTE
public boolean declaresCTE()
Subclasses may override this- Specified by:
declaresCTEin interfaceQueryPartInternal
-
generatesCast
public boolean generatesCast()
Subclasses may override this- Specified by:
generatesCastin interfaceQueryPartInternal
-
create
@Deprecated protected final DSLContext create()
Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()andConfiguration.dsl()instead.Internal convenience method
-
create
@Deprecated protected final DSLContext create(Configuration configuration)
Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()andConfiguration.dsl()instead.Internal convenience method
-
create
@Deprecated protected final DSLContext create(Context<?> ctx)
Deprecated.- 3.11.0 - [#6722] - UseAttachable.configuration()andConfiguration.dsl()instead.Internal convenience method
-
translate
protected final DataAccessException translate(String sql, SQLException e)
Internal convenience method
-
-