public class

VersionValue

extends Object
java.lang.Object
   ↳ org.hibernate.engine.VersionValue

Class Overview

A strategy for determining if a version value is an version of a new transient instance or a previously persistent transient instance. The strategy is determined by the unsaved-value attribute in the mapping file.

Summary

Fields
public static final VersionValue NEGATIVE Assume the transient instance is newly instantiated if the version is negative, otherwise assume it is a detached instance.
public static final VersionValue NULL Assume the transient instance is newly instantiated if the version is null, otherwise assume it is a detached instance.
public static final VersionValue UNDEFINED Assume the transient instance is newly instantiated if the version is null, otherwise defer to the identifier unsaved-value.
Public Constructors
VersionValue(Object value)
Assume the transient instance is newly instantiated if its version is null or equal to value
Protected Constructors
VersionValue()
Public Methods
Object getDefaultValue(Object currentValue)
Boolean isUnsaved(Object version)
Does the given version belong to a new instance?
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final VersionValue NEGATIVE

Assume the transient instance is newly instantiated if the version is negative, otherwise assume it is a detached instance.

public static final VersionValue NULL

Assume the transient instance is newly instantiated if the version is null, otherwise assume it is a detached instance.

public static final VersionValue UNDEFINED

Assume the transient instance is newly instantiated if the version is null, otherwise defer to the identifier unsaved-value.

Public Constructors

public VersionValue (Object value)

Assume the transient instance is newly instantiated if its version is null or equal to value

Parameters
value value to compare to

Protected Constructors

protected VersionValue ()

Public Methods

public Object getDefaultValue (Object currentValue)

public Boolean isUnsaved (Object version)

Does the given version belong to a new instance?

Parameters
version version to check
Returns
  • true is unsaved, false is saved, null is undefined

public String toString ()