public interface

UserVersionType

implements Comparator<T> UserType
org.hibernate.usertype.UserVersionType

Class Overview

A user type that may be used for a version property

Summary

Public Methods
abstract Object next(Object current, SessionImplementor session)
Increment the version.
abstract Object seed(SessionImplementor session)
Generate an initial version.
[Expand]
Inherited Methods
From interface java.util.Comparator
From interface org.hibernate.usertype.UserType

Public Methods

public abstract Object next (Object 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 Object seed (SessionImplementor session)

Generate an initial version.

Parameters
session The session from which this request originates. May be null; currently this only happens during startup when trying to determine the "unsaved value" of entities.
Returns
  • an instance of the type