注释类型 ValueGenerationType
-
@Target(ANNOTATION_TYPE) @Retention(RUNTIME) public @interface ValueGenerationType
Marks an annotation type as a generator annotation type.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
AnnotationValueGenerationwhich 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 toAnnotationValueGeneration.initialize(java.lang.annotation.Annotation, Class).Custom generator annotation types must have retention policy
RetentionPolicy.RUNTIME.- 作者:
- Gunnar Morling
-
-
必需元素概要
所需元素 修饰符和类型 必需的元素 说明 Class<? extends AnnotationValueGeneration<?>>generatedByThe type of value generation associated with the annotated value generator annotation type.
-
-
-
元素详细资料
-
generatedBy
Class<? extends AnnotationValueGeneration<?>> generatedBy
The type of value generation associated with the annotated value generator annotation type. The referenced generation type must be parameterized with the type of the given generator annotation.- 返回:
- the value generation type
-
-