Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | PointedEar | 1 | //$Id: GenerationType.java 11282 2007-03-14 22:05:59Z epbernard $ |
2 | //EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc. |
||
3 | package javax.persistence; |
||
4 | |||
5 | /** |
||
6 | * Defines the types of primary key generation. |
||
7 | * |
||
8 | * @author Emmanuel Bernard |
||
9 | */ |
||
10 | public enum GenerationType { |
||
11 | /** |
||
12 | * Indicates that the persistence provider must assign primary keys for the entity using an underlying |
||
13 | * database table to ensure uniqueness. |
||
14 | */ |
||
15 | TABLE, |
||
16 | /** |
||
17 | * Indicates that the persistence provider must assign primary keys for the entity using database |
||
18 | * sequence column. |
||
19 | */ |
||
20 | SEQUENCE, |
||
21 | /** |
||
22 | * Indicates that the persistence provider must assign primary keys for the entity using |
||
23 | * database identity column. |
||
24 | */ |
||
25 | IDENTITY, |
||
26 | /** |
||
27 | * Indicates that the persistence provider should pick an appropriate strategy for the |
||
28 | * particular database. The AUTO generation strategy may expect a database resource |
||
29 | * to exist, or it may attempt to create one. A vendor may provide documentation on how |
||
30 | * to create such resources in the event that it does not support schema generation or cannot |
||
31 | * create the schema resource at runtime. |
||
32 | */ |
||
33 | AUTO |
||
34 | }; |