类 CreationTimestampGeneration
- java.lang.Object
-
- org.hibernate.tuple.CreationTimestampGeneration
-
public class CreationTimestampGeneration extends Object implements AnnotationValueGeneration<CreationTimestamp>
Value generation implementation forCreationTimestamp.- 作者:
- Gunnar Morling
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 CreationTimestampGeneration()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetDatabaseGeneratedReferencedColumnValue()For values which are generated in the database (ValueGeneration.getValueGenerator()==null), if the column will be referenced in the SQL (ValueGeneration.referenceColumnInSql()==true), what value should be used in the SQL as the column value.GenerationTiminggetGenerationTiming()When is this value generated : NEVER, INSERT, ALWAYS (INSERT+UPDATE)ValueGenerator<?>getValueGenerator()Obtain the in-VM value generator.voidinitialize(CreationTimestamp annotation, Class<?> propertyType)Initializes this generation strategy for the given annotation instance.booleanreferenceColumnInSql()For values which are generated in the database (ValueGeneration.getValueGenerator()==null), should the column be referenced in the INSERT / UPDATE SQL?
-
-
-
方法详细资料
-
initialize
public void initialize(CreationTimestamp annotation, Class<?> propertyType)
从接口复制的说明:AnnotationValueGenerationInitializes this generation strategy for the given annotation instance.- 指定者:
initialize在接口中AnnotationValueGeneration<CreationTimestamp>- 参数:
annotation- an instance of the strategy's annotation type. Typically implementations will retrieve the annotation's attribute values and store them in fields.propertyType- the type of the property annotated with the generator annotation. Implementations may use the type to determine the rightValueGeneratorto be applied.
-
getGenerationTiming
public GenerationTiming getGenerationTiming()
从接口复制的说明:ValueGenerationWhen is this value generated : NEVER, INSERT, ALWAYS (INSERT+UPDATE)- 指定者:
getGenerationTiming在接口中ValueGeneration- 返回:
- When the value is generated.
-
getValueGenerator
public ValueGenerator<?> getValueGenerator()
从接口复制的说明:ValueGenerationObtain the in-VM value generator. May returnnull. In fact for values that are generated "in the database" via execution of the INSERT/UPDATE statement, the expectation is thatnullbe returned here- 指定者:
getValueGenerator在接口中ValueGeneration- 返回:
- The strategy for performing in-VM value generation
-
referenceColumnInSql
public boolean referenceColumnInSql()
从接口复制的说明:ValueGenerationFor values which are generated in the database (ValueGeneration.getValueGenerator()==null), should the column be referenced in the INSERT / UPDATE SQL? This will be false most often to have a DDL-defined DEFAULT value be applied on INSERT- 指定者:
referenceColumnInSql在接口中ValueGeneration- 返回:
trueindicates the column should be included in the SQL.
-
getDatabaseGeneratedReferencedColumnValue
public String getDatabaseGeneratedReferencedColumnValue()
从接口复制的说明:ValueGenerationFor values which are generated in the database (ValueGeneration.getValueGenerator()==null), if the column will be referenced in the SQL (ValueGeneration.referenceColumnInSql()==true), what value should be used in the SQL as the column value. Generally this will be a function call or a marker (DEFAULTS). NOTE : for in-VM generation, this will not be called and the column value will implicitly be a JDBC parameter ('?')- 指定者:
getDatabaseGeneratedReferencedColumnValue在接口中ValueGeneration- 返回:
- The column value to be used in the SQL.
-
-