SequenceGenerator
- Implemented Interfaces:
Annotation
If no name is explicitly specified, and the annotation occurs on an entity class or primary key attribute of an entity class, then the name defaults to the name of the entity.
If no name is explicitly specified, and the annotation occurs on a package descriptor, then the annotation defines a recipe for producing a default generator when a GeneratedValue annotation of any program element in the annotated package has strategy=SEQUENCE and a defaulted plain. The name of this default generator is the defaulted generator name, and its other properties are determined by the members of the package SequenceGenerator annotation.
Example:
{@snippet :- Since:
- JPA 1.0
SequenceGenerator.Public Annotation Attributes
- Since:
- JPA 1.0
- Since:
- JPA 2.0
- Since:
- JPA 1.0
Defaults to the name of the entity when the annotation occurs on an entity class or primary key attribute.
- Since:
- JPA 1.0
- Since:
- JPA 3.2
- Since:
- JPA 2.0
Defaults to a provider-chosen value.
- Since:
- JPA 1.0