public interface

VersionType

implements Type
org.hibernate.type.VersionType<T>
Known Indirect Subclasses

Class Overview

Additional contract for types which may be used to version (and optimistic lock) data.

Summary

Public Methods
abstract Comparator<T> getComparator()
Get a comparator for version values.
abstract boolean isEqual(T x, T y)
Are the two version values considered equal?
abstract T next(T current, SessionImplementor session)
Increment the version.
abstract T seed(SessionImplementor session)
Generate an initial version.
[Expand]
Inherited Methods
From interface org.hibernate.type.Type

Public Methods

public abstract Comparator<T> getComparator ()

Get a comparator for version values.

Returns
  • The comparator to use to compare different version values.

public abstract boolean isEqual (T x, T y)

Are the two version values considered equal?

Parameters
x One value to check.
y The other value to check.
Returns
  • true if the values are equal, false otherwise.

public abstract T next (T current, SessionImplementor session)

Increment the version.

Parameters
current the current version
session The session from which this request originates.
Returns
  • an instance of the type

public abstract T seed (SessionImplementor session)

Generate an initial version.

Parameters
session The session from which this request originates.
Returns
  • an instance of the type