Package org.hibernate.engine.internal
Class UnsavedValueFactory
- java.lang.Object
-
- org.hibernate.engine.internal.UnsavedValueFactory
-
public class UnsavedValueFactory extends Object
Helper for dealing with unsaved value handling
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IdentifierValue
getUnsavedIdentifierValue(KeyValue bootIdMapping, JavaType<?> idJtd, Getter getter, Supplier<?> templateInstanceAccess)
Return the UnsavedValueStrategy for determining whether an entity instance is unsaved based on the identifier.static <T> VersionValue
getUnsavedVersionValue(KeyValue bootVersionMapping, VersionJavaType<T> jtd, Getter getter, Supplier<?> templateInstanceAccess)
Return theUnsavedValueStrategy
for determining whether an entity instance is unsaved based on the version.
-
-
-
Method Detail
-
getUnsavedIdentifierValue
public static IdentifierValue getUnsavedIdentifierValue(KeyValue bootIdMapping, JavaType<?> idJtd, Getter getter, Supplier<?> templateInstanceAccess)
Return the UnsavedValueStrategy for determining whether an entity instance is unsaved based on the identifier. If an explicit strategy is not specified, determine the unsaved value by instantiating an instance of the entity and reading the value of its id property, or if that is not possible, using the java default value for the type
-
getUnsavedVersionValue
public static <T> VersionValue getUnsavedVersionValue(KeyValue bootVersionMapping, VersionJavaType<T> jtd, Getter getter, Supplier<?> templateInstanceAccess)
Return theUnsavedValueStrategy
for determining whether an entity instance is unsaved based on the version. If an explicit strategy is not specified, determine the unsaved value by instantiating an instance of the entity and reading the value of its version property, or if that is not possible, using the java default value for the type.
-
-