Package org.hibernate.annotations
Annotation Type GeneratorType
-
@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface GeneratorType
Marks a property as generated, specifying theValueGeneratortype to be used for generating the value. It is the responsibility of the client to ensure that a generator type is specified which matches the data type of the annotated property.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<? extends ValueGenerator<?>>typeThe value generator type
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description GenerationTimewhenWhen to generate the value, either only during insert or during insert and update of the hosting entity.
-
-
-
Element Detail
-
type
Class<? extends ValueGenerator<?>> type
The value generator type- Returns:
- the value generator type
-
-
-
when
GenerationTime when
When to generate the value, either only during insert or during insert and update of the hosting entity.- Returns:
- the time of generation
- Default:
- org.hibernate.annotations.GenerationTime.ALWAYS
-
-