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
@Internal
@Deprecated(since="6.2")
@Remove
public class UpdateTimestampGeneration
extends Object
implements AnnotationValueGeneration<UpdateTimestamp>
Deprecated.
Value generation implementation for
UpdateTimestamp
, no longer used.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.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.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.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.Deprecated.Obtain the Java value generator, if the value is generated in Java, or returnnull
if the value is generated by the database.void
initialize
(UpdateTimestamp annotation, Class<?> propertyType) Deprecated.Initializes this generation strategy for the given annotation instance.boolean
Deprecated.Determines if the column whose value is generated is included in the column list of the SQLinsert
orupdate
statement, 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
allowAssignedIdentifiers, generatedOnExecution, 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
-
Constructor Details
-
UpdateTimestampGeneration
public UpdateTimestampGeneration()Deprecated.
-
-
Method Details
-
initialize
Deprecated.Description copied from interface:AnnotationValueGeneration
Initializes this generation strategy for the given annotation instance.- Specified by:
initialize
in 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
Deprecated.Description copied from interface:ValueGeneration
Specifies that the property value is generated:- Specified by:
getGenerationTiming
in interfaceValueGeneration
- Returns:
- The
GenerationTiming
specifying when the value is generated.
-
getValueGenerator
Deprecated.Description copied from interface:ValueGeneration
Obtain the Java value generator, if the value is generated in Java, or returnnull
if the value is generated by the database.- Specified by:
getValueGenerator
in interfaceValueGeneration
- Returns:
- The value generator
-
referenceColumnInSql
public boolean referenceColumnInSql()Deprecated.Description copied from interface:ValueGeneration
Determines if the column whose value is generated is included in the column list of the SQLinsert
orupdate
statement, in the case where the value is generated by the database. For example, this method should return:true
if the value is generated by calling a SQL function likecurrent_timestamp
, orfalse
if the value is generated by a trigger, bygenerated always as
, or using a column default value.
If the value is generated in Java, this method is not called, and so for backward compatibility with Hibernate 5 it is permitted to return any value. On the other hand, when a property value is generated in Java, the column certainly must be included in the column list, and so it's most correct for this method to return
true
!- Specified by:
referenceColumnInSql
in interfaceValueGeneration
- Returns:
true
if the column is included in the column list of the SQL statement.
-
getDatabaseGeneratedReferencedColumnValue
Deprecated.Description copied from interface:ValueGeneration
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. The SQL expression might be:- a function call like
current_timestamp
ornextval('mysequence')
, or - a syntactic marker like
default
.
When the property value is generated in Java, this method is not called, and its value is implicitly the string
"?"
, that is, a JDBC parameter to which the generated value is bound.- Specified by:
getDatabaseGeneratedReferencedColumnValue
in interfaceValueGeneration
- Returns:
- The column value to be used in the generated SQL statement.
- a function call like
-
getDatabaseGeneratedReferencedColumnValue
Deprecated.Description copied from interface:ValueGeneration
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. The SQL expression might be:- a function call like
current_timestamp
ornextval('mysequence')
, or - a syntactic marker like
default
.
When the property value is generated in Java, this method is not called, and its value is implicitly the string
"?"
, that is, a JDBC parameter to which the generated value is bound.- Specified by:
getDatabaseGeneratedReferencedColumnValue
in 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
-
CurrentTimestampGeneration