Package org.hibernate.type.internal
Class UserTypeVersionJavaTypeWrapper<J>
- java.lang.Object
-
- org.hibernate.type.internal.UserTypeJavaTypeWrapper<J>
-
- org.hibernate.type.internal.UserTypeVersionJavaTypeWrapper<J>
-
- All Implemented Interfaces:
Serializable
,BasicJavaType<J>
,JavaType<J>
,VersionJavaType<J>
public class UserTypeVersionJavaTypeWrapper<J> extends UserTypeJavaTypeWrapper<J> implements VersionJavaType<J>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.type.internal.UserTypeJavaTypeWrapper
UserTypeJavaTypeWrapper.MutabilityPlanWrapper<J>
-
Nested classes/interfaces inherited from interface org.hibernate.type.descriptor.java.JavaType
JavaType.CoercionContext
-
-
Field Summary
-
Fields inherited from class org.hibernate.type.internal.UserTypeJavaTypeWrapper
userType
-
-
Constructor Summary
Constructors Constructor Description UserTypeVersionJavaTypeWrapper(UserVersionType<J> userType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description J
next(J current, Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)
Increment the version.J
seed(Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)
Generate an initial version.-
Methods inherited from class org.hibernate.type.internal.UserTypeJavaTypeWrapper
areEqual, extractHashCode, fromString, getComparator, getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlScale, getJavaTypeClass, getMutabilityPlan, getRecommendedJdbcType, toString, unwrap, wrap
-
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
appendEncodedString, areEqual, coerce, createJavaType, createJavaType, extractHashCode, extractLoggableRepresentation, fromEncodedString, getCheckCondition, getComparator, getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlScale, getDefaultValue, getJavaType, getJavaTypeClass, getLongSqlLength, getMutabilityPlan, getReplacement, getTypeName, isInstance, isTemporalType, isWider, toString, unwrap, useObjectEqualsHashCode, wrap
-
-
-
-
Constructor Detail
-
UserTypeVersionJavaTypeWrapper
public UserTypeVersionJavaTypeWrapper(UserVersionType<J> userType)
-
-
Method Detail
-
seed
public J seed(Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)
Description copied from interface:VersionJavaType
Generate an initial version.Note that this operation is only used when the program sets a null or negative number as the value of the entity version field. It is not called when the program sets the version field to a sensible-looking version.
- Specified by:
seed
in interfaceVersionJavaType<J>
- 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
-
next
public J next(J current, Long length, Integer precision, Integer scale, SharedSessionContractImplementor session)
Description copied from interface:VersionJavaType
Increment the version.- Specified by:
next
in interfaceVersionJavaType<J>
- 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
-
-