Class UnsavedValueFactory


  • public class UnsavedValueFactory
    extends Object
    Helper for dealing with unsaved value handling
    • 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 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.