KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > jpa > model > JPAAnnotations


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.jpa.model;
21
22 import java.util.Arrays JavaDoc;
23 import java.util.Set JavaDoc;
24 import java.util.TreeSet JavaDoc;
25
26 /**
27  * Constants for annotation classes defined by the Java Persistestence API
28  *
29  * @author Tomasz Slota
30  */

31 public class JPAAnnotations {
32     
33     //class level annotations...
34
public static final String JavaDoc ENTITY = "javax.persistence.Entity"; //NOI18N
35
public static final String JavaDoc MAPPED_SUPERCLASS = "javax.persistence.MappedSuperclass"; //NOI18N
36
public static final String JavaDoc EMBEDDABLE = "javax.persistence.Embeddable"; // NOI18N
37
public static final String JavaDoc ID_CLASS = "javax.persistence.IdClass"; //NOI18N
38
public static final String JavaDoc SEQUENCE_GENERATOR = "javax.persistence.SequenceGenerator"; // NOI18N
39
public static final String JavaDoc TABLE_GENERATOR = "javax.persistence.TableGenerator"; // NOI18N
40
public static final String JavaDoc INHERITANCE = "javax.persistence.Inheritance"; // NOI18N
41
public static final String JavaDoc DISCRIMINATOR_COLUMN = "javax.persistence.DiscriminatorColumn"; // NOI18N
42
public static final String JavaDoc DISCRIMINATOR_VALUE = "javax.persistence.DiscriminatorValue"; // NOI18N
43
public static final String JavaDoc TABLE = "javax.persistence.Table"; // NOI18N
44
public static final String JavaDoc SECONDARY_TABLE = "javax.persistence.SecondaryTable"; // NOI18N
45
public static final String JavaDoc SECONDARY_TABLES = "javax.persistence.SecondaryTables"; // NOI18N
46
public static final String JavaDoc PK_JOIN_COLUMN = "javax.persistence.PrimaryKeyJoinColumn"; // NOI18N
47
public static final String JavaDoc PK_JOIN_COLUMNS = "javax.persistence.PrimaryKeyJoinColumns"; // NOI18N
48
public static final String JavaDoc ATTRIBUTE_OVERRIDE = "javax.persistence.AttributeOverride"; // NOI18N
49
public static final String JavaDoc ATTRIBUTE_OVERRIDES = "javax.persistence.AttributeOverrides"; // NOI18N
50
public static final String JavaDoc ASSOCIATION_OVERRIDE = "javax.persistence.AssociationOverride"; // NOI18N
51
public static final String JavaDoc ASSOCIATION_OVERRIDES = "javax.persistence.AssociationOverrides"; // NOI18N
52
public static final String JavaDoc NAMED_QUERY = "javax.persistence.NamedQuery"; // NOI18N
53
public static final String JavaDoc NAMED_NATIVE_QUERY = "javax.persistence.NamedNativeQuery"; // NOI18N
54

55     // member level annotations...
56
public static final String JavaDoc ID = "javax.persistence.Id"; //NOI18N
57
public static final String JavaDoc EMBEDDED_ID = "javax.persistence.EmbeddedId"; //NOI18N
58
public static final String JavaDoc EMBEDDED = "javax.persistence.Embedded"; // NOI18N
59
public static final String JavaDoc TRANSIENT = "javax.persistence.Transient"; //NOI18N
60
public static final String JavaDoc VERSION = "javax.persistence.Version"; //NOI18N
61
public static final String JavaDoc BASIC = "javax.persistence.Basic"; //NOI18N
62
public static final String JavaDoc ENUMERATED = "javax.persistence.Enumerated"; //NOI18N
63
public static final String JavaDoc GENERATED_VALUE = "javax.persistence.GeneratedValue"; // NOI18N
64
public static final String JavaDoc ONE_TO_ONE = "javax.persistence.OneToOne"; // NOI18N
65
public static final String JavaDoc ONE_TO_MANY = "javax.persistence.OneToMany"; // NOI18N
66
public static final String JavaDoc MANY_TO_ONE = "javax.persistence.ManyToOne"; // NOI18N
67
public static final String JavaDoc MANY_TO_MANY = "javax.persistence.ManyToMany"; // NOI18N
68
public static final String JavaDoc MAP_KEY = "javax.persistence.MapKey"; //NOI18N
69
public static final String JavaDoc LOB = "javax.persistence.Lob"; //NOI18N
70
public static final String JavaDoc TEMPORAL = "javax.persistence.Temporal"; //NOI18N
71
public static final String JavaDoc COLUMN = "javax.persistence.Column"; // NOI18N
72
public static final String JavaDoc JOIN_COLUMN = "javax.persistence.JoinColumn"; // NOI18N
73
public static final String JavaDoc JOIN_COLUMNS = "javax.persistence.JoinColumns"; // NOI18N
74
public static final String JavaDoc JOIN_TABLE = "javax.persistence.JoinTable"; //NOI18N
75

76     public static final Set JavaDoc<String JavaDoc> MEMBER_LEVEL = new TreeSet JavaDoc<String JavaDoc>(Arrays.asList(
77             ID, EMBEDDED_ID, EMBEDDED, TRANSIENT, VERSION, BASIC, ENUMERATED,
78             GENERATED_VALUE,ONE_TO_ONE, ONE_TO_MANY, MANY_TO_ONE, MANY_TO_MANY,
79             MAP_KEY, LOB, TEMPORAL, COLUMN, JOIN_COLUMN, JOIN_COLUMNS,JOIN_TABLE));
80     
81     // annotation methods...
82
//nullable attribute in annotations like Column, JoinColumn etc.
83
public static final String JavaDoc NULLABLE_ATTR = "nullable"; // NOI18N
84

85     //value attribute in annotations with single attribute
86
public static final String JavaDoc VALUE_ATTR = "value"; //NOI18N
87

88     public static final String JavaDoc NAME_ATTR = "name"; //NOI18N
89

90     
91     // TODO: Add other constants here
92
}
93
Popular Tags