Jakarta Persistence (JPA) Enum

jakarta.persistence.GenerationType

java.lang.Object
  java.lang.Enum<jakarta.persistence.GenerationType>
    jakarta.persistence.GenerationType
Implemented Interfaces:
Constable, Comparable<E>, Serializable

Enumerates the defined primary key generation strategies.
See Also:
Since:
Jakarta Persistence (JPA) 1.0
The Auto Generated Values article explains how to use GenerationType.

Enum Constants

Indicates that the persistence provider should pick an appropriate strategy for the particular database.

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:
Jakarta Persistence (JPA) 1.0
Indicates that the persistence provider must assign primary keys for the entity using a database identity column.

May be used to generate primary keys of type Long, Integer, long, or int.

Since:
Jakarta Persistence (JPA) 1.0
Indicates that the persistence provider must assign primary keys for the entity using a database sequence.

May be used to generate primary keys of type Long, Integer, long, or int.

Since:
Jakarta Persistence (JPA) 1.0
Indicates that the persistence provider must assign primary keys for the entity using an underlying database table to ensure uniqueness.

May be used to generate primary keys of type Long, Integer, long, or int.

Since:
Jakarta Persistence (JPA) 1.0
Indicates that the persistence provider must assign primary keys for the entity by generating an RFC 4122 Universally Unique IDentifier.

May be used to generate primary keys of type UUID or String.

Since:
Jakarta Persistence (JPA) 1.0

Synthetic Public Static Methods:

values(), valueOf(String)

Additional JDK methods inherited from java.lang.Enum

clone(), compareTo(E), describeConstable(), equals(Object), finalize(), getDeclaringClass(), hashCode(), name(), ordinal(), readObject(ObjectInputStream), readObjectNoData(), toString(), valueOf(Class,String)

Additional JDK methods inherited from java.lang.Object

clone(), equals(Object), finalize(), getClass(), hashCode(), notify(), notifyAll(), toString(), wait(), wait(long), wait(long,int), wait0(long)

Additional JDK methods inherited from java.lang.constant.Constable

describeConstable()

Additional JDK methods inherited from java.lang.Comparable

compareTo(T)