Package org.hibernate.engine
Class VersionValue
java.lang.Object
org.hibernate.engine.VersionValue
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VersionValueAssume the transient instance is newly instantiated if the version is negative, otherwise assume it is a detached instance.static final VersionValueAssume the transient instance is newly instantiated if the version is null, otherwise assume it is a detached instance.static final VersionValueAssume the transient instance is newly instantiated if the version is null, otherwise defer to the identifier unsaved-value. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVersionValue(Object value) Assume the transient instance is newly instantiated if its version is null or equal to value -
Method Summary
-
Field Details
-
NULL
Assume the transient instance is newly instantiated if the version is null, otherwise assume it is a detached instance. -
UNDEFINED
Assume the transient instance is newly instantiated if the version is null, otherwise defer to the identifier unsaved-value. -
NEGATIVE
Assume the transient instance is newly instantiated if the version is negative, otherwise assume it is a detached instance.
-
-
Constructor Details
-
VersionValue
protected VersionValue() -
VersionValue
Assume the transient instance is newly instantiated if its version is null or equal to value- Parameters:
value- value to compare to
-
-
Method Details
-
isUnsaved
Does the given version belong to a new instance?- Parameters:
version- version to check- Returns:
- true is unsaved, false is saved, null is undefined
- Throws:
MappingException
-
getDefaultValue
-
toString
-