站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

VersionType (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.type
Interface VersionType

All Superinterfaces:
Serializable, Type
All Known Implementing Classes:
ByteType, CalendarType, IntegerType, LongType, ShortType, TimestampType

public interface VersionType
extends Type

A Type that may be used to version data.

Author:
Gavin King

Method Summary
 Comparator getComparator()
          Get a comparator for the version numbers
 Object next(Object current)
          Increment the version.
 Object seed()
          Generate an initial version.
 
Methods inherited from interface net.sf.hibernate.type.Type
assemble, copy, deepCopy, disassemble, equals, fromString, getColumnSpan, getName, getReturnedClass, hasNiceEquals, hydrate, isAssociationType, isComponentType, isDirty, isEntityType, isModified, isMutable, isObjectType, isPersistentCollectionType, nullSafeGet, nullSafeGet, nullSafeSet, resolveIdentifier, sqlTypes, toString
 

Method Detail

seed

public Object seed()
Generate an initial version.

Returns:
an instance of the type

next

public Object next(Object current)
Increment the version.

Parameters:
current - the current version
Returns:
an instance of the type

getComparator

public Comparator getComparator()
Get a comparator for the version numbers

Returns:
a comparator