注释类型 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.- 作者:
- Gunnar Morling
-
-
必需元素概要
所需元素 修饰符和类型 必需的元素 说明 Class<? extends ValueGenerator<?>>typeThe value generator type
-
可选元素概要
可选元素 修饰符和类型 可选元素 说明 GenerationTimewhenWhen to generate the value, either only during insert or during insert and update of the hosting entity.
-
-
-
元素详细资料
-
type
Class<? extends ValueGenerator<?>> type
The value generator type- 返回:
- 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.- 返回:
- the time of generation
- 默认值:
- org.hibernate.annotations.GenerationTime.ALWAYS
-
-