Top Description Fields Constructors Methods
org.hibernate.tuple

public Class UpdateTimestampGeneration

extends Object
implements AnnotationValueGeneration<UpdateTimestamp>
Class Inheritance
All Implemented Interfaces
org.hibernate.tuple.AnnotationValueGeneration, org.hibernate.generator.AnnotationBasedGenerator, org.hibernate.generator.Generator, java.io.Serializable, org.hibernate.tuple.ValueGeneration, org.hibernate.generator.OnExecutionGenerator, org.hibernate.generator.BeforeExecutionGenerator
Annotations
@Internal
@Deprecated
since:6.2
@Remove
Imports
org.hibernate.Internal, .Remove, org.hibernate.annotations.SourceType, .UpdateTimestamp, org.hibernate.dialect.Dialect

Deprecated

since 6.2.

use org.hibernate.generator.internal.CurrentTimestampGeneration

Value generation implementation for UpdateTimestamp, no longer used.
Author
Gunnar Morling

Field Summary

Modifier and TypeField and Description
private ValueGenerator<?>
generator

Deprecated as a consequence of ValueGenerator being deprecated.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getDatabaseGeneratedReferencedColumnValue()

Implements org.hibernate.tuple.ValueGeneration.getDatabaseGeneratedReferencedColumnValue.

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.
public String
getDatabaseGeneratedReferencedColumnValue(Dialect
The SQL dialect, allowing generation of an expression in dialect-specific SQL.
dialect
)

Overrides default org.hibernate.tuple.ValueGeneration.getDatabaseGeneratedReferencedColumnValue.

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.
public GenerationTiming
public ValueGenerator<?>
getValueGenerator()

Implements org.hibernate.tuple.ValueGeneration.getValueGenerator.

Deprecated as a consequence of ValueGenerator being deprecated.
Obtain the Java value generator, if the value is generated in Java, or return null if the value is generated by the database.
public void
initialize(UpdateTimestamp
an instance of the strategy's annotation type. Typically, implementations will retrieve the annotation's attribute values and store them in fields.
annotation
,
Class<?>
the type of the property annotated with the generator annotation.
propertyType
)

Implements org.hibernate.tuple.AnnotationValueGeneration.initialize.

Initializes this generation strategy for the given annotation instance.
public boolean
referenceColumnInSql()

Implements org.hibernate.tuple.ValueGeneration.referenceColumnInSql.

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.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

generatorback to summary
private ValueGenerator<?> generator

Deprecated

as a consequence of ValueGenerator being deprecated. See corresponding docs for further information.

Constructor Detail

UpdateTimestampGenerationback to summary
public UpdateTimestampGeneration()

Method Detail

getDatabaseGeneratedReferencedColumnValueback to summary
public String getDatabaseGeneratedReferencedColumnValue()

Implements org.hibernate.tuple.ValueGeneration.getDatabaseGeneratedReferencedColumnValue.

Doc from org.hibernate.tuple.ValueGeneration.getDatabaseGeneratedReferencedColumnValue.

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.

Returns:String

The column value to be used in the generated SQL statement.

Annotations
@Override
getDatabaseGeneratedReferencedColumnValueback to summary
public String getDatabaseGeneratedReferencedColumnValue(Dialect dialect)

Overrides default org.hibernate.tuple.ValueGeneration.getDatabaseGeneratedReferencedColumnValue.

Doc from org.hibernate.tuple.ValueGeneration.getDatabaseGeneratedReferencedColumnValue.

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.

Parameters
dialect:Dialect

The SQL dialect, allowing generation of an expression in dialect-specific SQL.

Returns:String

The column value to be used in the generated SQL statement.

Annotations
@Override
getGenerationTimingback to summary
public GenerationTiming getGenerationTiming()

Implements org.hibernate.tuple.ValueGeneration.getGenerationTiming.

Doc from org.hibernate.tuple.ValueGeneration.getGenerationTiming.

Deprecated

as a consequence of GenerationTiming being deprecated. See corresponding docs for further information.

Specifies that the property value is generated:

Returns:GenerationTiming

The GenerationTiming specifying when the value is generated.

Annotations
@Override
getValueGeneratorback to summary
public ValueGenerator<?> getValueGenerator()

Implements org.hibernate.tuple.ValueGeneration.getValueGenerator.

Doc from org.hibernate.tuple.ValueGeneration.getValueGenerator.

Deprecated

as a consequence of ValueGenerator being deprecated. See corresponding docs for further information.

Obtain the Java value generator, if the value is generated in Java, or return null if the value is generated by the database.

Returns:ValueGenerator<?>

The value generator

Annotations
@Override
initializeback to summary
public void initialize(UpdateTimestamp annotation, Class<?> propertyType)

Implements org.hibernate.tuple.AnnotationValueGeneration.initialize.

Doc from org.hibernate.tuple.AnnotationValueGeneration.initialize.

Initializes this generation strategy for the given annotation instance.

Parameters
annotation:UpdateTimestamp

an instance of the strategy's annotation type. Typically, implementations will retrieve the annotation's attribute values and store them in fields.

propertyType:Class<?>

the type of the property annotated with the generator annotation.

Annotations
@Override
referenceColumnInSqlback to summary
public boolean referenceColumnInSql()

Implements org.hibernate.tuple.ValueGeneration.referenceColumnInSql.

Doc from org.hibernate.tuple.ValueGeneration.referenceColumnInSql.

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!

Returns:boolean

true if the column is included in the column list of the SQL statement.

Annotations
@Override