Class UnsavedValueFactory

java.lang.Object
org.hibernate.engine.internal.UnsavedValueFactory

public class UnsavedValueFactory extends Object
Helper for dealing with unsaved value handling
  • Method Details

    • getUnsavedIdentifierValue

      public static IdentifierValue getUnsavedIdentifierValue(KeyValue bootIdMapping, JavaType<?> idJavaType, 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> versionJavaType, Getter getter, Supplier<?> templateInstanceAccess)
      Return the 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.