org.hibernate.type
Interface VersionType

All Superinterfaces:
Serializable, Type
All Known Implementing Classes:
ByteType, CalendarType, CustomType, 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
 boolean isEqual(Object x, Object y)
           
 Object next(Object current)
          Increment the version.
 Object seed()
          Generate an initial version.
 
Methods inherited from interface org.hibernate.type.Type
assemble, compare, deepCopy, disassemble, fromXMLNode, getColumnSpan, getHashCode, getHashCode, getName, getReturnedClass, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, isXMLElement, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, resolve, semiResolve, setToXMLNode, sqlTypes, toLoggableString
 

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


isEqual

public boolean isEqual(Object x,
                       Object y)