Package org.hibernate.annotations
Annotation Type ValueGenerationType
-
@Target(ANNOTATION_TYPE) @Retention(RUNTIME) public @interface ValueGenerationType
Meta-annotation used to mark another annotation as providing configuration for a custom value generation strategy. This is the best way to work with customized value generation in Hibernate.For example, if we have a custom value generator:
Then we may also define an annotation which associates this generator with a field or property of an entity and supplies configuration parameters:public class SKUGeneration implements InMemoryValueGenerationStrategy, ValueGenerator<String> { ... }
{@code
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<? extends Generator>
generatedBy
A class which implementsGenerator
.
-