类 UnsavedValueFactory
- java.lang.Object
-
- org.hibernate.engine.internal.UnsavedValueFactory
-
public class UnsavedValueFactory extends Object
Helper for dealing with unsaved value handling- 作者:
- Gavin King
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static IdentifierValuegetUnsavedIdentifierValue(String unsavedValue, Getter identifierGetter, Type identifierType, Constructor constructor)Return an IdentifierValue for the specified unsaved-value.static VersionValuegetUnsavedVersionValue(String versionUnsavedValue, Getter versionGetter, VersionType versionType, Constructor constructor)Return an IdentifierValue for the specified unsaved-value.
-
-
-
方法详细资料
-
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 valueidentifierGetter- The getter for the entity identifier attributeidentifierType- The mapping type for the identifierconstructor- 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 valueversionGetter- The version attribute getterversionType- The mapping type for the versionconstructor- The constructor for the entity- 返回:
- The appropriate VersionValue
-
-