Top Description Methods
org.hibernate.annotations

public @Interface CreationTimestamp

extends Annotation
Annotations
@ValueGenerationType
generatedBy:CurrentTimestampGeneration
@Retention:RUNTIME
@Target:FIELD, METHOD
Static Imports
java.lang.annotation.ElementType.FIELD, .ElementType.METHOD, .RetentionPolicy.RUNTIME

Specifies that the annotated field of property is a generated creation timestamp. The timestamp is generated just once, when an entity instance is inserted in the database.

By default, the timestamp is generated by in memory, but this may be changed by explicitly specifying the source. Otherwise, this annotation is a synonym for @CurrentTimestamp(timing=INSERT,source=VM).

Author
Gunnar Morling
See Also
CurrentTimestamp

Method Summary

Modifier and TypeMethod and Description
public SourceType
source()

Specifies how the timestamp is generated.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

sourceback to summary
public SourceType source()

Specifies how the timestamp is generated. By default, it is generated in memory, which saves a round trip to the database.