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.UseValueGenerationinsteadWrapper 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 booleanareEqual(T one, T another)Deprecated.Determine if two instances are equal<X> Tcoerce(X value, JavaType.CoercionContext coercionContext)Deprecated.intextractHashCode(T value)Deprecated.Extract a proper hash code for this value.StringextractLoggableRepresentation(T value)Deprecated.Extract a loggable representation of the value.TfromString(CharSequence string)Deprecated.StringgetCheckCondition(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.longgetDefaultSqlLength(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.intgetDefaultSqlPrecision(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.intgetDefaultSqlScale(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.TypegetJavaType()Deprecated.Get the Java type (Type) describedClass<T>getJavaTypeClass()Deprecated.Get the Java type (Class) describedlonggetLongSqlLength()Deprecated.The default column length when this Java type is mapped to a column of typeTypes.LONGVARCHARorTypes.LONGVARBINARY.MutabilityPlan<T>getMutabilityPlan()Deprecated.Retrieve the mutability plan for this Java type.TemporalTypegetPrecision()Deprecated.The precision represented by this typeJdbcTypegetRecommendedJdbcType(JdbcTypeIndicators indicators)Deprecated.Obtain the "recommended" SQL type descriptor for this Java type.Tnext(T current, Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)Deprecated.Increment the version.<X> TemporalJavaType<X>resolveTypeForPrecision(TemporalType precision, TypeConfiguration typeConfiguration)Deprecated.Resolve the appropriate TemporalJavaType for the given precision "relative" to this type.Tseed(Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)Deprecated.Generate an initial version.StringtoString(T value)Deprecated.<X> Xunwrap(T value, Class<X> type, WrapperOptions options)Deprecated.Unwrap an instance of our handled Java type into the requested type.<X> Twrap(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:VersionJavaTypeIncrement the version.- Specified by:
nextin 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:VersionJavaTypeGenerate an initial version.- Specified by:
seedin 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:JavaTypeObtain the "recommended" SQL type descriptor for this Java type. The recommended aspect comes from the JDBC spec (mostly).- Specified by:
getRecommendedJdbcTypein interfaceBasicJavaType<T>- Specified by:
getRecommendedJdbcTypein interfaceJavaType<T>- Parameters:
indicators- Contextual information- Returns:
- The recommended SQL type descriptor
-
fromString
public T fromString(CharSequence string)
Deprecated.- Specified by:
fromStringin interfaceBasicJavaType<T>- Specified by:
fromStringin interfaceJavaType<T>
-
getJavaType
public Type getJavaType()
Deprecated.Description copied from interface:JavaTypeGet the Java type (Type) described- Specified by:
getJavaTypein interfaceJavaType<T>- See Also:
JavaType.getJavaTypeClass()
-
getMutabilityPlan
public MutabilityPlan<T> getMutabilityPlan()
Deprecated.Description copied from interface:JavaTypeRetrieve the mutability plan for this Java type.- Specified by:
getMutabilityPlanin interfaceJavaType<T>
-
getDefaultSqlLength
public long getDefaultSqlLength(Dialect dialect, JdbcType jdbcType)
Deprecated.Description copied from interface:JavaTypeThe default column length when this Java type is mapped to a SQL data type which is parametrized by length, for exampleTypes.VARCHAR.- Specified by:
getDefaultSqlLengthin interfaceJavaType<T>- Returns:
Size.DEFAULT_LENGTHunless overridden
-
getLongSqlLength
public long getLongSqlLength()
Deprecated.Description copied from interface:JavaTypeThe default column length when this Java type is mapped to a column of typeTypes.LONGVARCHARorTypes.LONGVARBINARY.- Specified by:
getLongSqlLengthin interfaceJavaType<T>- Returns:
Size.LONG_LENGTHunless overridden
-
getDefaultSqlPrecision
public int getDefaultSqlPrecision(Dialect dialect, JdbcType jdbcType)
Deprecated.Description copied from interface:JavaTypeThe default column precision when this Java type is mapped to a SQL data type which is parametrized by precision, for exampleTypes.DECIMAL.- Specified by:
getDefaultSqlPrecisionin interfaceJavaType<T>- Returns:
Size.DEFAULT_PRECISIONunless overridden
-
getDefaultSqlScale
public int getDefaultSqlScale(Dialect dialect, JdbcType jdbcType)
Deprecated.Description copied from interface:JavaTypeThe default column scale when this Java type is mapped to a SQL data type which is parametrized by scale, for exampleTypes.DECIMAL.- Specified by:
getDefaultSqlScalein interfaceJavaType<T>- Returns:
Size.DEFAULT_SCALEunless overridden
-
getComparator
public Comparator<T> getComparator()
Deprecated.Description copied from interface:JavaTypeRetrieve the natural comparator for this type.- Specified by:
getComparatorin interfaceJavaType<T>
-
extractHashCode
public int extractHashCode(T value)
Deprecated.Description copied from interface:JavaTypeExtract a proper hash code for this value.- Specified by:
extractHashCodein 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:JavaTypeDetermine if two instances are equal
-
extractLoggableRepresentation
public String extractLoggableRepresentation(T value)
Deprecated.Description copied from interface:JavaTypeExtract a loggable representation of the value.- Specified by:
extractLoggableRepresentationin 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:JavaTypeUnwrap 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 valueas aLongwe would return something likeLong.valueOf( value.longValue() ). Intended use is duringPreparedStatementbinding.
-
wrap
public <X> T wrap(X value, WrapperOptions options)
Deprecated.Description copied from interface:JavaTypeWrap a value as our handled Java type. Intended use is duringResultSetextraction.
-
coerce
public <X> T coerce(X value, JavaType.CoercionContext coercionContext)
Deprecated.
-
getJavaTypeClass
public Class<T> getJavaTypeClass()
Deprecated.Description copied from interface:JavaTypeGet the Java type (Class) described- Specified by:
getJavaTypeClassin interfaceJavaType<T>- See Also:
JavaType.getJavaType()
-
getCheckCondition
public String getCheckCondition(String columnName, JdbcType sqlType, Dialect dialect)
Deprecated.Description copied from interface:JavaTypeThe check constraint that should be added to the column definition in generated DDL.- Specified by:
getCheckConditionin interfaceJavaType<T>- Parameters:
columnName- the name of the columnsqlType- theJdbcTypeof the mapped columndialect- the SQLDialect- Returns:
- a check constraint condition or null
-
getPrecision
public TemporalType getPrecision()
Deprecated.Description copied from interface:TemporalJavaTypeThe precision represented by this type- Specified by:
getPrecisionin interfaceTemporalJavaType<T>
-
resolveTypeForPrecision
public <X> TemporalJavaType<X> resolveTypeForPrecision(TemporalType precision, TypeConfiguration typeConfiguration)
Deprecated.Description copied from interface:TemporalJavaTypeResolve the appropriate TemporalJavaType for the given precision "relative" to this type.- Specified by:
resolveTypeForPrecisionin interfaceTemporalJavaType<T>
-
-