Class DbTimestampJavaType<T>
- java.lang.Object
-
- org.hibernate.type.descriptor.java.DbTimestampJavaType<T>
-
- All Implemented Interfaces:
Serializable
,BasicJavaType<T>
,JavaType<T>
,TemporalJavaType<T>
,VersionJavaType<T>
@Deprecated public class DbTimestampJavaType<T> extends Object implements VersionJavaType<T>, TemporalJavaType<T>
Deprecated.UseValueGeneration
insteadWrapper Java type descriptor for that uses the database timestamp as seed value for versions.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.type.descriptor.java.JavaType
JavaType.CoercionContext
-
-
Constructor Summary
Constructors Constructor Description DbTimestampJavaType(TemporalJavaType<T> delegate)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
areEqual(T one, T another)
Deprecated.Determine if two instances are equal<X> T
coerce(X value, JavaType.CoercionContext coercionContext)
Deprecated.int
extractHashCode(T value)
Deprecated.Extract a proper hash code for this value.String
extractLoggableRepresentation(T value)
Deprecated.Extract a loggable representation of the value.T
fromString(CharSequence string)
Deprecated.String
getCheckCondition(String columnName, JdbcType sqlType, Dialect dialect)
Deprecated.The check constraint that should be added to the column definition in generated DDL.Comparator<T>
getComparator()
Deprecated.Retrieve the natural comparator for this type.long
getDefaultSqlLength(Dialect dialect, JdbcType jdbcType)
Deprecated.The default column length when this Java type is mapped to a SQL data type which is parametrized by length, for exampleTypes.VARCHAR
.int
getDefaultSqlPrecision(Dialect dialect, JdbcType jdbcType)
Deprecated.The default column precision when this Java type is mapped to a SQL data type which is parametrized by precision, for exampleTypes.DECIMAL
.int
getDefaultSqlScale(Dialect dialect, JdbcType jdbcType)
Deprecated.The default column scale when this Java type is mapped to a SQL data type which is parametrized by scale, for exampleTypes.DECIMAL
.Type
getJavaType()
Deprecated.Get the Java type (Type) describedClass<T>
getJavaTypeClass()
Deprecated.Get the Java type (Class) describedlong
getLongSqlLength()
Deprecated.The default column length when this Java type is mapped to a column of typeTypes.LONGVARCHAR
orTypes.LONGVARBINARY
.MutabilityPlan<T>
getMutabilityPlan()
Deprecated.Retrieve the mutability plan for this Java type.jakarta.persistence.TemporalType
getPrecision()
Deprecated.The precision represented by this typeJdbcType
getRecommendedJdbcType(JdbcTypeIndicators indicators)
Deprecated.Obtain the "recommended" SQL type descriptor for this Java type.T
next(T current, Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)
Deprecated.Increment the version.<X> TemporalJavaType<X>
resolveTypeForPrecision(jakarta.persistence.TemporalType precision, TypeConfiguration typeConfiguration)
Deprecated.Resolve the appropriate TemporalJavaType for the given precision "relative" to this type.T
seed(Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)
Deprecated.Generate an initial version.String
toString(T value)
Deprecated.<X> X
unwrap(T value, Class<X> type, WrapperOptions options)
Deprecated.Unwrap an instance of our handled Java type into the requested type.<X> T
wrap(X value, WrapperOptions options)
Deprecated.Wrap a value as our handled Java type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.type.descriptor.java.JavaType
createJavaType, createJavaType, getDefaultValue, getReplacement, isInstance, isWider
-
-
-
-
Constructor Detail
-
DbTimestampJavaType
public DbTimestampJavaType(TemporalJavaType<T> delegate)
Deprecated.
-
-
Method Detail
-
next
public T next(T current, Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)
Deprecated.Description copied from interface:VersionJavaType
Increment the version.- Specified by:
next
in interfaceVersionJavaType<T>
- Parameters:
current
- the current versionlength
- The length of the typeprecision
- The precision of the typescale
- The scale of the typesession
- The session from which this request originates.- Returns:
- an instance of the type
-
seed
public T seed(Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)
Deprecated.Description copied from interface:VersionJavaType
Generate an initial version.- Specified by:
seed
in interfaceVersionJavaType<T>
- Parameters:
length
- The length of the typeprecision
- The precision of the typescale
- The scale of the typesession
- The session from which this request originates.- Returns:
- an instance of the type
-
getRecommendedJdbcType
public JdbcType getRecommendedJdbcType(JdbcTypeIndicators indicators)
Deprecated.Description copied from interface:JavaType
Obtain the "recommended" SQL type descriptor for this Java type. The recommended aspect comes from the JDBC spec (mostly).- Specified by:
getRecommendedJdbcType
in interfaceBasicJavaType<T>
- Specified by:
getRecommendedJdbcType
in interfaceJavaType<T>
- Parameters:
indicators
- Contextual information- Returns:
- The recommended SQL type descriptor
-
fromString
public T fromString(CharSequence string)
Deprecated.- Specified by:
fromString
in interfaceBasicJavaType<T>
- Specified by:
fromString
in interfaceJavaType<T>
-
getJavaType
public Type getJavaType()
Deprecated.Description copied from interface:JavaType
Get the Java type (Type) described- Specified by:
getJavaType
in interfaceJavaType<T>
- See Also:
JavaType.getJavaTypeClass()
-
getMutabilityPlan
public MutabilityPlan<T> getMutabilityPlan()
Deprecated.Description copied from interface:JavaType
Retrieve the mutability plan for this Java type.- Specified by:
getMutabilityPlan
in interfaceJavaType<T>
-
getDefaultSqlLength
public long getDefaultSqlLength(Dialect dialect, JdbcType jdbcType)
Deprecated.Description copied from interface:JavaType
The default column length when this Java type is mapped to a SQL data type which is parametrized by length, for exampleTypes.VARCHAR
.- Specified by:
getDefaultSqlLength
in interfaceJavaType<T>
- Returns:
Size.DEFAULT_LENGTH
unless overridden
-
getLongSqlLength
public long getLongSqlLength()
Deprecated.Description copied from interface:JavaType
The default column length when this Java type is mapped to a column of typeTypes.LONGVARCHAR
orTypes.LONGVARBINARY
.- Specified by:
getLongSqlLength
in interfaceJavaType<T>
- Returns:
Size.LONG_LENGTH
unless overridden
-
getDefaultSqlPrecision
public int getDefaultSqlPrecision(Dialect dialect, JdbcType jdbcType)
Deprecated.Description copied from interface:JavaType
The default column precision when this Java type is mapped to a SQL data type which is parametrized by precision, for exampleTypes.DECIMAL
.- Specified by:
getDefaultSqlPrecision
in interfaceJavaType<T>
- Returns:
Size.DEFAULT_PRECISION
unless overridden
-
getDefaultSqlScale
public int getDefaultSqlScale(Dialect dialect, JdbcType jdbcType)
Deprecated.Description copied from interface:JavaType
The default column scale when this Java type is mapped to a SQL data type which is parametrized by scale, for exampleTypes.DECIMAL
.- Specified by:
getDefaultSqlScale
in interfaceJavaType<T>
- Returns:
Size.DEFAULT_SCALE
unless overridden
-
getComparator
public Comparator<T> getComparator()
Deprecated.Description copied from interface:JavaType
Retrieve the natural comparator for this type.- Specified by:
getComparator
in interfaceJavaType<T>
-
extractHashCode
public int extractHashCode(T value)
Deprecated.Description copied from interface:JavaType
Extract a proper hash code for this value.- Specified by:
extractHashCode
in interfaceJavaType<T>
- Parameters:
value
- The value for which to extract a hash code.- Returns:
- The extracted hash code.
-
areEqual
public boolean areEqual(T one, T another)
Deprecated.Description copied from interface:JavaType
Determine if two instances are equal
-
extractLoggableRepresentation
public String extractLoggableRepresentation(T value)
Deprecated.Description copied from interface:JavaType
Extract a loggable representation of the value.- Specified by:
extractLoggableRepresentation
in interfaceJavaType<T>
- Parameters:
value
- The value for which to extract a loggable representation.- Returns:
- The loggable representation
-
unwrap
public <X> X unwrap(T value, Class<X> type, WrapperOptions options)
Deprecated.Description copied from interface:JavaType
Unwrap an instance of our handled Java type into the requested type. As an example, if this is aJavaType<Integer>
and we are asked to unwrap theInteger value
as aLong
we would return something likeLong.valueOf( value.longValue() )
. Intended use is duringPreparedStatement
binding.
-
wrap
public <X> T wrap(X value, WrapperOptions options)
Deprecated.Description copied from interface:JavaType
Wrap a value as our handled Java type. Intended use is duringResultSet
extraction.
-
coerce
public <X> T coerce(X value, JavaType.CoercionContext coercionContext)
Deprecated.
-
getJavaTypeClass
public Class<T> getJavaTypeClass()
Deprecated.Description copied from interface:JavaType
Get the Java type (Class) described- Specified by:
getJavaTypeClass
in interfaceJavaType<T>
- See Also:
JavaType.getJavaType()
-
getCheckCondition
public String getCheckCondition(String columnName, JdbcType sqlType, Dialect dialect)
Deprecated.Description copied from interface:JavaType
The check constraint that should be added to the column definition in generated DDL.- Specified by:
getCheckCondition
in interfaceJavaType<T>
- Parameters:
columnName
- the name of the columnsqlType
- theJdbcType
of the mapped columndialect
- the SQLDialect
- Returns:
- a check constraint condition or null
-
getPrecision
public jakarta.persistence.TemporalType getPrecision()
Deprecated.Description copied from interface:TemporalJavaType
The precision represented by this type- Specified by:
getPrecision
in interfaceTemporalJavaType<T>
-
resolveTypeForPrecision
public <X> TemporalJavaType<X> resolveTypeForPrecision(jakarta.persistence.TemporalType precision, TypeConfiguration typeConfiguration)
Deprecated.Description copied from interface:TemporalJavaType
Resolve the appropriate TemporalJavaType for the given precision "relative" to this type.- Specified by:
resolveTypeForPrecision
in interfaceTemporalJavaType<T>
-
-