KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > persistence > GenerationType


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 package javax.persistence;
22
23 /**
24  * Defines the types of primary key generation.
25  *
26  * @since Java Persistence 1.0
27  */

28 public enum GenerationType {
29
30     /**
31      * Indicates that the persistence provider must assign
32      * primary keys for the entity using an underlying
33      * database table to ensure uniqueness.
34      */

35     TABLE,
36
37     /**
38      * Indicates that the persistence provider must assign
39      * primary keys for the entity using database sequence column.
40      */

41     SEQUENCE,
42
43     /**
44      * Indicates that the persistence provider must assign
45      * primary keys for the entity using database identity column.
46      */

47     IDENTITY,
48
49     /**
50      * Indicates that the persistence provider should pick an
51      * appropriate strategy for the particular database. The
52      * <code>AUTO</code> generation strategy may expect a database
53      * resource to exist, or it may attempt to create one. A vendor
54      * may provide documentation on how to create such resources
55      * in the event that it does not support schema generation
56      * or cannot create the schema resource at runtime.
57      */

58     AUTO
59 }
60
Popular Tags