Interface JdbcTypeIndicators
-
- All Known Implementing Classes:
BaseSqmToSqlAstConverter
,BasicValue
,BasicValueBinder
,DependantBasicValue
,MultiTableSqmMutationConverter
,StandardSqmTranslator
,SybaseSqmToSqlAstConverter
public interface JdbcTypeIndicators
More-or-less a parameter-object intended for use in determining the SQL/JDBC type recommended by the JDBC spec (explicitly or implicitly) for a given Java type.
-
-
Field Summary
Fields Modifier and Type Field Description static int
NO_COLUMN_LENGTH
static int
NO_COLUMN_PRECISION
static int
NO_COLUMN_SCALE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default long
getColumnLength()
Useful for resolutions based on column length.default int
getColumnPrecision()
Useful for resolutions based on column precision.default int
getColumnScale()
Useful for resolutions based on column scale.default TimeZoneStorageStrategy
getDefaultTimeZoneStorageStrategy()
default jakarta.persistence.EnumType
getEnumeratedType()
For enum mappings, what style of storage was requested (name vs.default int
getPreferredSqlTypeCodeForArray()
When mapping a basic array or collection type to the database what is the preferred SQL type code to use?default int
getPreferredSqlTypeCodeForBoolean()
When mapping a boolean type to the database what is the preferred SQL type code to use?default int
getPreferredSqlTypeCodeForDuration()
When mapping a duration type to the database what is the preferred SQL type code to use?default int
getPreferredSqlTypeCodeForInstant()
When mapping an instant type to the database what is the preferred SQL type code to use?default int
getPreferredSqlTypeCodeForUuid()
When mapping an uuid type to the database what is the preferred SQL type code to use?default jakarta.persistence.TemporalType
getTemporalPrecision()
For temporal type mappings, what precision was requested?TypeConfiguration
getTypeConfiguration()
Provides access to the TypeConfiguration for access to various type-system registries.default boolean
isLob()
Was LOB datatype requested for the given Java type?default boolean
isNationalized()
Was nationalized character datatype requested for the given Java type?
-
-
-
Field Detail
-
NO_COLUMN_LENGTH
static final int NO_COLUMN_LENGTH
- See Also:
- Constant Field Values
-
NO_COLUMN_PRECISION
static final int NO_COLUMN_PRECISION
- See Also:
- Constant Field Values
-
NO_COLUMN_SCALE
static final int NO_COLUMN_SCALE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isNationalized
default boolean isNationalized()
Was nationalized character datatype requested for the given Java type?- Returns:
true
if nationalized character datatype should be used;false
otherwise.
-
isLob
default boolean isLob()
Was LOB datatype requested for the given Java type?- Returns:
true
if LOB datatype should be used;false
otherwise.
-
getEnumeratedType
default jakarta.persistence.EnumType getEnumeratedType()
For enum mappings, what style of storage was requested (name vs. ordinal)?- Returns:
- The enum type.
-
getTemporalPrecision
default jakarta.persistence.TemporalType getTemporalPrecision()
For temporal type mappings, what precision was requested?
-
getPreferredSqlTypeCodeForBoolean
default int getPreferredSqlTypeCodeForBoolean()
When mapping a boolean type to the database what is the preferred SQL type code to use? Specifically names the key into theJdbcTypeRegistry
.
-
getPreferredSqlTypeCodeForDuration
default int getPreferredSqlTypeCodeForDuration()
When mapping a duration type to the database what is the preferred SQL type code to use? Specifically names the key into theJdbcTypeRegistry
.
-
getPreferredSqlTypeCodeForUuid
default int getPreferredSqlTypeCodeForUuid()
When mapping an uuid type to the database what is the preferred SQL type code to use? Specifically names the key into theJdbcTypeRegistry
.
-
getPreferredSqlTypeCodeForInstant
default int getPreferredSqlTypeCodeForInstant()
When mapping an instant type to the database what is the preferred SQL type code to use? Specifically names the key into theJdbcTypeRegistry
.
-
getPreferredSqlTypeCodeForArray
default int getPreferredSqlTypeCodeForArray()
When mapping a basic array or collection type to the database what is the preferred SQL type code to use? Specifically names the key into theJdbcTypeRegistry
.- Since:
- 6.1
-
getColumnLength
default long getColumnLength()
Useful for resolutions based on column length. E.g. choosing between a VARCHAR (String) and a CHAR(1) (Character/char)
-
getColumnPrecision
default int getColumnPrecision()
Useful for resolutions based on column precision.
-
getColumnScale
default int getColumnScale()
Useful for resolutions based on column scale. E.g. choosing between a NUMERIC or INTERVAL
-
getDefaultTimeZoneStorageStrategy
default TimeZoneStorageStrategy getDefaultTimeZoneStorageStrategy()
-
getTypeConfiguration
TypeConfiguration getTypeConfiguration()
Provides access to the TypeConfiguration for access to various type-system registries.
-
-