接口 VersionType<T>
-
- 所有超级接口:
Serializable,Type
- 所有已知实现类:
BinaryType,ByteType,CalendarType,CustomType,DbTimestampType,InstantType,IntegerType,LocalDateTimeType,LongType,OffsetDateTimeType,RowVersionType,ShortType,TimestampType,ZonedDateTimeType
public interface VersionType<T> extends Type
Additional contract for types which may be used to version (and optimistic lock) data.- 作者:
- Gavin King, Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Comparator<T>getComparator()Get a comparator for version values.Tnext(T current, SharedSessionContractImplementor session)Increment the version.Tseed(SharedSessionContractImplementor session)Generate an initial version.-
从接口继承的方法 org.hibernate.type.Type
assemble, beforeAssemble, compare, deepCopy, defaultSizes, dictatedSizes, disassemble, getColumnSpan, getHashCode, getHashCode, getName, getReturnedClass, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, resolve, resolve, semiResolve, sqlTypes, toColumnNullness, toLoggableString
-
-
-
-
方法详细资料
-
seed
T seed(SharedSessionContractImplementor session)
Generate an initial version.- 参数:
session- The session from which this request originates.- 返回:
- an instance of the type
-
next
T next(T current, SharedSessionContractImplementor session)
Increment the version.- 参数:
session- The session from which this request originates.current- the current version- 返回:
- an instance of the type
-
getComparator
Comparator<T> getComparator()
Get a comparator for version values.- 返回:
- The comparator to use to compare different version values.
-
-