Class DelegatingJdbcTypeIndicators
java.lang.Object
org.hibernate.type.descriptor.jdbc.DelegatingJdbcTypeIndicators
- All Implemented Interfaces:
JdbcTypeIndicators
-
Field Summary
Fields inherited from interface org.hibernate.type.descriptor.jdbc.JdbcTypeIndicators
NO_COLUMN_LENGTH, NO_COLUMN_PRECISION, NO_COLUMN_SCALE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongUseful for resolutions based on column length.intUseful for resolutions based on column precision.intUseful for resolutions based on column scale.The defaultTimeZoneStorageStrategy.intintFor enum mappings, what style of storage was requested (name vs. ordinal)?Used (for now) only to choose a containerJdbcTypefor SQL arrays.getJdbcType(int jdbcTypeCode) TheJdbcTyperegistered under the given type code with the associatedJdbcTypeRegistry.intWhen mapping a basic array or collection type to the database what is the preferred SQL type code to use?intWhen mapping a boolean type to the database what is the preferred SQL type code to use?intWhen mapping a duration type to the database what is the preferred SQL type code to use?intWhen mapping an instant type to the database what is the preferred SQL type code to use?intWhen mapping an uuid type to the database what is the preferred SQL type code to use?For temporal type mappings, what precision was requested?Provides access to theTypeConfigurationfor access to various type system related registries.static intgetZonedTimeSqlType(TimeZoneStorageStrategy storageStrategy) static intgetZonedTimestampSqlType(TimeZoneStorageStrategy storageStrategy) booleanisLob()Was LOB datatype requested for the given Java type?booleanWas nationalized character datatype requested for the given Java type?booleanbooleanintresolveJdbcTypeCode(int jdbcTypeCode) Resolves the given type code to a possibly different type code, based on context.
-
Constructor Details
-
DelegatingJdbcTypeIndicators
-
-
Method Details
-
isNationalized
public boolean isNationalized()Description copied from interface:JdbcTypeIndicatorsWas nationalized character datatype requested for the given Java type?- Specified by:
isNationalizedin interfaceJdbcTypeIndicators- Returns:
trueif nationalized character datatype should be used;falseotherwise.
-
isLob
public boolean isLob()Description copied from interface:JdbcTypeIndicatorsWas LOB datatype requested for the given Java type?- Specified by:
isLobin interfaceJdbcTypeIndicators- Returns:
trueif LOB datatype should be used;falseotherwise.
-
getEnumeratedType
Description copied from interface:JdbcTypeIndicatorsFor enum mappings, what style of storage was requested (name vs. ordinal)?- Specified by:
getEnumeratedTypein interfaceJdbcTypeIndicators- Returns:
- The enum type.
-
getTemporalPrecision
Description copied from interface:JdbcTypeIndicatorsFor temporal type mappings, what precision was requested?- Specified by:
getTemporalPrecisionin interfaceJdbcTypeIndicators
-
isPreferJavaTimeJdbcTypesEnabled
public boolean isPreferJavaTimeJdbcTypesEnabled()- Specified by:
isPreferJavaTimeJdbcTypesEnabledin interfaceJdbcTypeIndicators- See Also:
-
isPreferNativeEnumTypesEnabled
public boolean isPreferNativeEnumTypesEnabled()- Specified by:
isPreferNativeEnumTypesEnabledin interfaceJdbcTypeIndicators- See Also:
-
getPreferredSqlTypeCodeForBoolean
public int getPreferredSqlTypeCodeForBoolean()Description copied from interface:JdbcTypeIndicatorsWhen mapping a boolean type to the database what is the preferred SQL type code to use?Returns a key into the
JdbcTypeRegistry.- Specified by:
getPreferredSqlTypeCodeForBooleanin interfaceJdbcTypeIndicators- See Also:
-
getPreferredSqlTypeCodeForDuration
public int getPreferredSqlTypeCodeForDuration()Description copied from interface:JdbcTypeIndicatorsWhen mapping a duration type to the database what is the preferred SQL type code to use?Returns a key into the
JdbcTypeRegistry.- Specified by:
getPreferredSqlTypeCodeForDurationin interfaceJdbcTypeIndicators- See Also:
-
getPreferredSqlTypeCodeForUuid
public int getPreferredSqlTypeCodeForUuid()Description copied from interface:JdbcTypeIndicatorsWhen mapping an uuid type to the database what is the preferred SQL type code to use?Returns a key into the
JdbcTypeRegistry.- Specified by:
getPreferredSqlTypeCodeForUuidin interfaceJdbcTypeIndicators- See Also:
-
getPreferredSqlTypeCodeForInstant
public int getPreferredSqlTypeCodeForInstant()Description copied from interface:JdbcTypeIndicatorsWhen mapping an instant type to the database what is the preferred SQL type code to use?Returns a key into the
JdbcTypeRegistry.- Specified by:
getPreferredSqlTypeCodeForInstantin interfaceJdbcTypeIndicators- See Also:
-
getPreferredSqlTypeCodeForArray
public int getPreferredSqlTypeCodeForArray()Description copied from interface:JdbcTypeIndicatorsWhen mapping a basic array or collection type to the database what is the preferred SQL type code to use?Returns a key into the
JdbcTypeRegistry.- Specified by:
getPreferredSqlTypeCodeForArrayin interfaceJdbcTypeIndicators- See Also:
-
getColumnLength
public long getColumnLength()Description copied from interface:JdbcTypeIndicatorsUseful for resolutions based on column length.E.g. for choosing between a
VARCHAR(String) andCHAR(1)(Character/char).- Specified by:
getColumnLengthin interfaceJdbcTypeIndicators
-
getColumnPrecision
public int getColumnPrecision()Description copied from interface:JdbcTypeIndicatorsUseful for resolutions based on column precision.- Specified by:
getColumnPrecisionin interfaceJdbcTypeIndicators
-
getColumnScale
public int getColumnScale()Description copied from interface:JdbcTypeIndicatorsUseful for resolutions based on column scale.E.g. for choosing between a
NUMERICandINTERVAL SECOND.- Specified by:
getColumnScalein interfaceJdbcTypeIndicators
-
getExplicitJdbcTypeCode
Description copied from interface:JdbcTypeIndicatorsUsed (for now) only to choose a containerJdbcTypefor SQL arrays.- Specified by:
getExplicitJdbcTypeCodein interfaceJdbcTypeIndicators
-
getDefaultTimeZoneStorageStrategy
Description copied from interface:JdbcTypeIndicatorsThe defaultTimeZoneStorageStrategy.- Specified by:
getDefaultTimeZoneStorageStrategyin interfaceJdbcTypeIndicators- See Also:
-
getJdbcType
Description copied from interface:JdbcTypeIndicatorsTheJdbcTyperegistered under the given type code with the associatedJdbcTypeRegistry.- Specified by:
getJdbcTypein interfaceJdbcTypeIndicators- Parameters:
jdbcTypeCode- a type code fromSqlTypes- Returns:
- the
JdbcTyperegistered under that type code
-
resolveJdbcTypeCode
public int resolveJdbcTypeCode(int jdbcTypeCode) Description copied from interface:JdbcTypeIndicatorsResolves the given type code to a possibly different type code, based on context. A database might not support a certain type code in certain scenarios like within a UDT and has to resolve to a different type code in such a scenario.- Specified by:
resolveJdbcTypeCodein interfaceJdbcTypeIndicators- Parameters:
jdbcTypeCode- a type code fromSqlTypes- Returns:
- The jdbc type code to use
-
getTypeConfiguration
Description copied from interface:JdbcTypeIndicatorsProvides access to theTypeConfigurationfor access to various type system related registries.- Specified by:
getTypeConfigurationin interfaceJdbcTypeIndicators
-
getZonedTimeSqlType
- Returns:
- the SQL column type used for storing times under the given storage strategy
- See Also:
-
getZonedTimestampSqlType
- Returns:
- the SQL column type used for storing datetimes under the given storage strategy
- See Also:
-
getDefaultZonedTimeSqlType
public int getDefaultZonedTimeSqlType()- Specified by:
getDefaultZonedTimeSqlTypein interfaceJdbcTypeIndicators- Returns:
- the SQL column type used for storing datetimes under the default storage strategy
- See Also:
-
getDefaultZonedTimestampSqlType
public int getDefaultZonedTimestampSqlType()- Specified by:
getDefaultZonedTimestampSqlTypein interfaceJdbcTypeIndicators- Returns:
- the SQL column type used for storing datetimes under the default storage strategy
- See Also:
-
getDialect
- Specified by:
getDialectin interfaceJdbcTypeIndicators
-