Top Description Fields Constructors Methods
javax.persistence

public final Enum GenerationType

extends Enum<GenerationType>
Class Inheritance

Defines the types of primary key generation strategies.
Since
Java Persistence 1.0
See Also
GeneratedValue

Field Summary

Modifier and TypeField and Description
public static final GenerationType
AUTO

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

public static final GenerationType
IDENTITY

Indicates that the persistence provider must assign primary keys for the entity using a database identity column.

public static final GenerationType
SEQUENCE

Indicates that the persistence provider must assign primary keys for the entity using a database sequence.

public static final GenerationType
TABLE

Indicates that the persistence provider must assign primary keys for the entity using an underlying database table to ensure uniqueness.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static GenerationType
public static GenerationType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AUTOback to summary
public static final GenerationType AUTO

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.

IDENTITYback to summary
public static final GenerationType IDENTITY

Indicates that the persistence provider must assign primary keys for the entity using a database identity column.

SEQUENCEback to summary
public static final GenerationType SEQUENCE

Indicates that the persistence provider must assign primary keys for the entity using a database sequence.

TABLEback to summary
public static final GenerationType TABLE

Indicates that the persistence provider must assign primary keys for the entity using an underlying database table to ensure uniqueness.

Constructor Detail

GenerationTypeback to summary
private GenerationType()

Method Detail

valueOfback to summary
public static GenerationType valueOf(String name)
valuesback to summary
public static GenerationType[] values()