Package org.hibernate.tuple
Class UpdateTimestampGeneration
- java.lang.Object
-
- org.hibernate.tuple.UpdateTimestampGeneration
-
- All Implemented Interfaces:
Serializable,AnnotationBasedGenerator<UpdateTimestamp>,BeforeExecutionGenerator,Generator,OnExecutionGenerator,AnnotationValueGeneration<UpdateTimestamp>,ValueGeneration
@Deprecated(since="6.2") public class UpdateTimestampGeneration extends Object implements AnnotationValueGeneration<UpdateTimestamp>
Deprecated.useCurrentTimestampGenerationValue generation implementation forUpdateTimestamp, no longer used.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UpdateTimestampGeneration()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetDatabaseGeneratedReferencedColumnValue()Deprecated.A SQL expression indicating how to calculate the generated value when the property value is generated in the database and the mapped column is included in the SQL statement.StringgetDatabaseGeneratedReferencedColumnValue(Dialect dialect)Deprecated.A SQL expression indicating how to calculate the generated value when the property value is generated in the database and the mapped column is included in the SQL statement.GenerationTiminggetGenerationTiming()Deprecated.Specifies that the property value is generated: when the entity is inserted, when the entity is updated, whenever the entity is inserted or updated, or never.ValueGenerator<?>getValueGenerator()Deprecated.Obtain the Java value generator, if the value is generated in Java, or returnnullif the value is generated by the database.voidinitialize(UpdateTimestamp annotation, Class<?> propertyType)Deprecated.Initializes this generation strategy for the given annotation instance.booleanreferenceColumnInSql()Deprecated.Determines if the column whose value is generated is included in the column list of the SQLinsertorupdatestatement, in the case where the value is generated by the database.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.tuple.AnnotationValueGeneration
initialize
-
Methods inherited from interface org.hibernate.generator.Generator
generatesOnInsert, generatesOnUpdate, generatesSometimes
-
Methods inherited from interface org.hibernate.generator.OnExecutionGenerator
getGeneratedIdentifierDelegate, getUniqueKeyPropertyNames
-
Methods inherited from interface org.hibernate.tuple.ValueGeneration
generate, generatedOnExecution, getEventTypes, getReferencedColumnValues, referenceColumnsInSql, writePropertyValue
-
-
-
-
Method Detail
-
initialize
public void initialize(UpdateTimestamp annotation, Class<?> propertyType)
Deprecated.Description copied from interface:AnnotationValueGenerationInitializes this generation strategy for the given annotation instance.- Specified by:
initializein interfaceAnnotationValueGeneration<UpdateTimestamp>- Parameters:
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.
-
getGenerationTiming
public GenerationTiming getGenerationTiming()
Deprecated.Description copied from interface:ValueGenerationSpecifies that the property value is generated:- Specified by:
getGenerationTimingin interfaceValueGeneration- Returns:
- The
GenerationTimingspecifying when the value is generated.
-
getValueGenerator
public ValueGenerator<?> getValueGenerator()
Deprecated.Description copied from interface:ValueGenerationObtain the Java value generator, if the value is generated in Java, or returnnullif the value is generated by the database.- Specified by:
getValueGeneratorin interfaceValueGeneration- Returns:
- The value generator
-
referenceColumnInSql
public boolean referenceColumnInSql()
Deprecated.Description copied from interface:ValueGenerationDetermines if the column whose value is generated is included in the column list of the SQLinsertorupdatestatement, in the case where the value is generated by the database. For example, this method should return:trueif the value is generated by calling a SQL function likecurrent_timestamp, orfalseif the value is generated by a trigger, bygenerated always as, or using a column default value.
true!- Specified by:
referenceColumnInSqlin interfaceValueGeneration- Returns:
trueif the column is included in the column list of the SQL statement.
-
getDatabaseGeneratedReferencedColumnValue
public String getDatabaseGeneratedReferencedColumnValue()
Deprecated.Description copied from interface:ValueGenerationA SQL expression indicating how to calculate the generated value when the property value is generated in the database and the mapped column is included in the SQL statement. The SQL expression might be:- a function call like
current_timestampornextval('mysequence'), or - a syntactic marker like
default.
"?", that is, a JDBC parameter to which the generated value is bound.- Specified by:
getDatabaseGeneratedReferencedColumnValuein interfaceValueGeneration- Returns:
- The column value to be used in the generated SQL statement.
- a function call like
-
getDatabaseGeneratedReferencedColumnValue
public String getDatabaseGeneratedReferencedColumnValue(Dialect dialect)
Deprecated.Description copied from interface:ValueGenerationA SQL expression indicating how to calculate the generated value when the property value is generated in the database and the mapped column is included in the SQL statement. The SQL expression might be:- a function call like
current_timestampornextval('mysequence'), or - a syntactic marker like
default.
"?", that is, a JDBC parameter to which the generated value is bound.- Specified by:
getDatabaseGeneratedReferencedColumnValuein interfaceValueGeneration- Parameters:
dialect- The SQL dialect, allowing generation of an expression in dialect-specific SQL.- Returns:
- The column value to be used in the generated SQL statement.
- a function call like
-
-