@Target(value=ANNOTATION_TYPE)
@Retention(value=RUNTIME)
public @interface ValueGenerationType
Adding a generator annotation to an entity property causes the value of the property to be generated upon insert or update of the owning entity. Not more than one generator annotation may be placed on a given property.
Each generator annotation type is associated with a AnnotationValueGeneration
which implements the strategy
for generating the value. Generator annotation types may define arbitrary custom attributes, e.g. allowing the
client to configure the generation timing (if applicable) or other settings taking an effect on the value generation.
The corresponding implementation can retrieve these settings from the annotation instance passed to
AnnotationValueGeneration.initialize(java.lang.annotation.Annotation, Class)
.
Custom generator annotation types must have retention policy RetentionPolicy.RUNTIME
.
Modifier and Type | Required Element and Description |
---|---|
java.lang.Class<? extends AnnotationValueGeneration<?>> |
generatedBy
The type of value generation associated with the annotated value generator annotation type.
|
public abstract java.lang.Class<? extends AnnotationValueGeneration<?>> generatedBy
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.