Top Description Constructors Methods
org.hibernate.engine.internal

public Class UnsavedValueFactory

extends Object
Class Inheritance
Imports
java.lang.reflect.Constructor, java.util.function.Supplier, org.hibernate.InstantiationException, .MappingException, org.hibernate.engine.spi.IdentifierValue, .VersionValue, org.hibernate.mapping.KeyValue, org.hibernate.property.access.spi.Getter, org.hibernate.type.descriptor.java.JavaType, .VersionJavaType, org.hibernate.type.descriptor.java.spi.PrimitiveJavaType

Helper for dealing with unsaved value handling
Author
Gavin King

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
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.

public static <T> VersionValue
getUnsavedVersionValue(KeyValue bootVersionMapping, VersionJavaType<T> jtd, Long length, Integer precision, Integer scale, Getter getter, Supplier<?> templateInstanceAccess)

Return the org.hibernate.engine.spi.UnsavedValueStrategy for determining whether an entity instance is unsaved based on the version.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

UnsavedValueFactoryback to summary
private UnsavedValueFactory()

Method Detail

getUnsavedIdentifierValueback to summary
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

getUnsavedVersionValueback to summary
public static <T> VersionValue getUnsavedVersionValue(KeyValue bootVersionMapping, VersionJavaType<T> jtd, Long length, Integer precision, Integer scale, Getter getter, Supplier<?> templateInstanceAccess)

Return the org.hibernate.engine.spi.UnsavedValueStrategy 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.