Package org.hibernate.annotations
Annotation Type IdGeneratorType
-
@Target(ANNOTATION_TYPE) @Retention(RUNTIME) public @interface IdGeneratorType
Meta-annotation used to mark another annotation as providing configuration for a custom identifier generator. This is the best way to work with customized identifier generation in Hibernate.For example, if we have a custom identifier generator:
Then we may also define an annotation which associates this generator with an entity and supplies configuration parameters:public class CustomSequenceGenerator implements BeforeExecutionGenerator { public CustomSequenceGenerator(CustomSequence config, Member annotatedMember, CustomIdGeneratorCreationContext context) { ... } ... }
{@code
- Since:
- 6.0
- See Also:
Generator
,AnnotationBasedGenerator