Top Description Methods
org.hibernate.tuple

public Interface AnnotationValueGeneration<A extends java.lang.annotation.Annotation>

extends ValueGeneration
Known Direct Implementers
org.hibernate.tuple.CreationTimestampGeneration, org.hibernate.tuple.GeneratedValueGeneration, org.hibernate.tuple.UpdateTimestampGeneration, org.hibernate.tuple.VmValueGeneration
Type Parameters
<A>
The generator annotation type supported by an implementation
Imports
java.lang.annotation.Annotation

A ValueGeneration based on a custom Java generator annotation type.
Author
Gunnar Morling

Method Summary

Modifier and TypeMethod and Description
public void
initialize(A
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. Implementations may use the type to determine the right ValueGenerator to be applied.
propertyType
)

Initializes this generation strategy for the given annotation instance.

Inherited from org.hibernate.tuple.ValueGeneration:
getDatabaseGeneratedReferencedColumnValuegetGenerationTiminggetValueGeneratorreferenceColumnInSqltimingMatches

Method Detail

initializeback to summary
public void initialize(A annotation, Class<?> propertyType)

Initializes this generation strategy for the given annotation instance.

Parameters
annotation:A

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. Implementations may use the type to determine the right ValueGenerator to be applied.

Exceptions
HibernateException:
in case an error occurred during initialization, e.g. if an implementation can't create a value for the given property type.