GenerationType
java.lang.Object ∟ java.lang.Enum<jakarta.persistence.GenerationType> ∟ jakarta.persistence.GenerationType
Enumerates the defined primary key generation strategies.
- See Also:
- GeneratedValue
- Since:
- JPA 1.0
The Auto Generated Values article explains how to use
GenerationType.Enum Constants
- For a primary key of type java.util.UUID or String, this is equivalent to GenerationType.UUID.
- For a primary key of type Long, Integer,
long, orint, the provider selects between GenerationType.TABLE, GenerationType.SEQUENCE, and GenerationType.IDENTITY.
The AUTO generation strategy may expect a database resource to exist, or it may attempt to create one. A vendor may provide documentation on how to create such resources in the event that it does not support schema generation or cannot create the schema resource at runtime.
- Since:
- JPA 1.0
May be used to generate primary keys of type Long, Integer, long, or int.
- Since:
- JPA 1.0
May be used to generate primary keys of type Long, Integer, long, or int.
- Since:
- JPA 1.0
May be used to generate primary keys of type Long, Integer, long, or int.
- Since:
- JPA 1.0
May be used to generate primary keys of type java.util.UUID or String.
- Since:
- JPA 1.0
Public Static Enum Methods:
Method inherited from class java.lang.Enum
compareTo, compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf