类 UnsavedValueFactory


  • public class UnsavedValueFactory
    extends Object
    Helper for dealing with unsaved value handling
    作者:
    Gavin King
    • 方法详细资料

      • getUnsavedIdentifierValue

        public static IdentifierValue getUnsavedIdentifierValue​(String unsavedValue,
                                                                Getter identifierGetter,
                                                                Type identifierType,
                                                                Constructor constructor)
        Return an IdentifierValue for the specified unsaved-value. If none is specified, guess the unsaved value by instantiating a test instance of the class and reading it's id property, or if that is not possible, using the java default value for the type
        参数:
        unsavedValue - The mapping defined unsaved value
        identifierGetter - The getter for the entity identifier attribute
        identifierType - The mapping type for the identifier
        constructor - The constructor for the entity
        返回:
        The appropriate IdentifierValue
      • getUnsavedVersionValue

        public static VersionValue getUnsavedVersionValue​(String versionUnsavedValue,
                                                          Getter versionGetter,
                                                          VersionType versionType,
                                                          Constructor constructor)
        Return an IdentifierValue for the specified unsaved-value. If none is specified, guess the unsaved value by instantiating a test instance of the class and reading it's version property value, or if that is not possible, using the java default value for the type
        参数:
        versionUnsavedValue - The mapping defined unsaved value
        versionGetter - The version attribute getter
        versionType - The mapping type for the version
        constructor - The constructor for the entity
        返回:
        The appropriate VersionValue