Package org.hibernate.tuple
Interface AnnotationValueGeneration<A extends java.lang.annotation.Annotation>
-
- Type Parameters:
A
- The generator annotation type supported by an implementation
- All Superinterfaces:
java.io.Serializable
,ValueGeneration
- All Known Implementing Classes:
CreationTimestampGeneration
,GeneratedValueGeneration
,UpdateTimestampGeneration
,VmValueGeneration
public interface AnnotationValueGeneration<A extends java.lang.annotation.Annotation> extends ValueGeneration
AValueGeneration
based on a custom Java generator annotation type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
initialize(A annotation, java.lang.Class<?> propertyType)
Initializes this generation strategy for the given annotation instance.-
Methods inherited from interface org.hibernate.tuple.ValueGeneration
getDatabaseGeneratedReferencedColumnValue, getGenerationTiming, getValueGenerator, referenceColumnInSql
-
-
-
-
Method Detail
-
initialize
void initialize(A annotation, java.lang.Class<?> propertyType)
Initializes this generation strategy for the given annotation instance.- 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. Implementations may use the type to determine the rightValueGenerator
to be applied.- Throws:
HibernateException
- in case an error occurred during initialization, e.g. if an implementation can't create a value for the given property type.
-
-