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.
use CurrentTimestampGeneration
Value generation implementation for UpdateTimestamp, no longer used.
See Also:
  • Constructor Details

    • UpdateTimestampGeneration

      public UpdateTimestampGeneration()
      Deprecated.
  • Method Details

    • initialize

      public void initialize(UpdateTimestamp annotation, Class<?> propertyType)
      Deprecated.
      Description copied from interface: AnnotationValueGeneration
      Initializes this generation strategy for the given annotation instance.
      Specified by:
      initialize in interface AnnotationValueGeneration<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: ValueGeneration
      Specified by:
      getGenerationTiming in interface ValueGeneration
      Returns:
      The GenerationTiming specifying when the value is generated.
    • getValueGenerator

      public ValueGenerator<?> getValueGenerator()
      Deprecated.
      Description copied from interface: ValueGeneration
      Obtain the Java value generator, if the value is generated in Java, or return null if the value is generated by the database.
      Specified by:
      getValueGenerator in interface ValueGeneration
      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 SQL insert or update statement, in the case where the value is generated by the database. For example, this method should return:

      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 interface ValueGeneration
      Returns:
      true if the column is included in the column list of the SQL statement.
    • getDatabaseGeneratedReferencedColumnValue

      public String 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 or nextval('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 interface ValueGeneration
      Returns:
      The column value to be used in the generated SQL statement.
    • getDatabaseGeneratedReferencedColumnValue

      public String getDatabaseGeneratedReferencedColumnValue(Dialect dialect)
      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 or nextval('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 interface ValueGeneration
      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.