KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > metadata > MDStatics


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.metadata;
13
14 /**
15  * Constants used in the meta data.
16  */

17 public interface MDStatics {
18
19     public static final int CASCADE_PERSIST = 1;
20     public static final int CASCADE_MERGE = 2;
21     public static final int CASCADE_REMOVE = 4;
22     public static final int CASCADE_REFRESH = 8;
23     public static final int CASCADE_ALL = CASCADE_PERSIST + CASCADE_MERGE + CASCADE_REMOVE + CASCADE_REFRESH;
24
25     /**
26      * Boolean value not set in a .jdo file.
27      */

28     public static final int NOT_SET = 0;
29     /**
30      * Boolean value set as false in a .jdo file.
31      */

32     public static final int FALSE = 1;
33     /**
34      * Boolean value set as true in a .jdo file.
35      */

36     public static final int TRUE = 2;
37
38     public static final int IDENTITY_TYPE_APPLICATION = 1;
39     public static final int IDENTITY_TYPE_DATASTORE = 2;
40     public static final int IDENTITY_TYPE_NONDURABLE = 3;
41
42     public static final int PERSISTENCE_MODIFIER_PERSISTENT = 1;
43     public static final int PERSISTENCE_MODIFIER_TRANSACTIONAL = 2;
44     public static final int PERSISTENCE_MODIFIER_NONE = 3;
45
46     public static final int NULL_VALUE_EXCEPTION = 1;
47     public static final int NULL_VALUE_DEFAULT = 2;
48     public static final int NULL_VALUE_NONE = 3;
49
50     /**
51      * A datastore identity primary key 'field' (used by workbench).
52      */

53     public static final int CATEGORY_DATASTORE_PK = 1;
54     /**
55      * A class-id 'field' (used by workbench).
56      */

57     public static final int CATEGORY_CLASS_ID = 2;
58     /**
59      * A version or timestamp 'field' (used by workbench).
60      */

61     public static final int CATEGORY_OPT_LOCKING = 3;
62
63     /**
64      * A normal field (e.g. int, String etc).
65      */

66     public static final int CATEGORY_SIMPLE = 4;
67     /**
68      * A reference to a PC class.
69      */

70     public static final int CATEGORY_REF = 5;
71     /**
72      * A reference to any PC class.
73      */

74     public static final int CATEGORY_POLYREF = 6;
75     /**
76      * A Collection.
77      */

78     public static final int CATEGORY_COLLECTION = 7;
79     /**
80      * An array.
81      */

82     public static final int CATEGORY_ARRAY = 8;
83     /**
84      * A Map.
85      */

86     public static final int CATEGORY_MAP = 9;
87     /**
88      * A transactional non-persistent field.
89      */

90     public static final int CATEGORY_TRANSACTIONAL = 10;
91     /**
92      * A non-persistent field.
93      */

94     public static final int CATEGORY_NONE = 11;
95     /**
96      * An externalized field
97      */

98     public static final int CATEGORY_EXTERNALIZED = 12;
99
100     public static final int AUTOSET_NO = 0;
101     public static final int AUTOSET_CREATED = 1;
102     public static final int AUTOSET_MODIFIED = 2;
103     public static final int AUTOSET_BOTH = 3;
104
105     /**
106      * Do not cache instances of this class.
107      */

108     public static final int CACHE_STRATEGY_NO = 1;
109     /**
110      * Cache instances of this class.
111      */

112     public static final int CACHE_STRATEGY_YES = 2;
113     /**
114      * Cache all instances of this class as soon as an instance is requested.
115      * All rows from its table will be read and cached whenever an instance
116      * is requested but not found in cache. This may work well for small
117      * static tables when using a big cache.
118      */

119     public static final int CACHE_STRATEGY_ALL = 3;
120
121     // type codes for all the simple JDO types
122

123     public static final int BOOLEAN = 1;
124     public static final int BYTE = 2;
125     public static final int SHORT = 3;
126     public static final int INT = 4;
127     public static final int LONG = 5;
128     public static final int FLOAT = 6;
129     public static final int DOUBLE = 7;
130     public static final int CHAR = 8;
131
132     // W => Wrapper
133
public static final int BOOLEANW = 9;
134     public static final int BYTEW = 10;
135     public static final int SHORTW = 11;
136     public static final int INTW = 12;
137     public static final int LONGW = 13;
138     public static final int FLOATW = 14;
139     public static final int DOUBLEW = 15;
140     public static final int CHARW = 16;
141
142     public static final int STRING = 17;
143     public static final int BIGDECIMAL = 18;
144     public static final int BIGINTEGER = 19;
145     public static final int DATE = 20;
146     public static final int LOCALE = 21;
147
148     public static final int LIST = 22;
149     public static final int ARRAYLIST = 23;
150     public static final int LINKEDLIST = 24;
151     public static final int VECTOR = 25;
152
153     public static final int SET = 26;
154     public static final int HASHSET = 27;
155     public static final int TREESET = 28;
156     public static final int SORTEDSET = 50;
157
158     public static final int MAP = 29;
159     public static final int HASHMAP = 30;
160     public static final int TREEMAP = 31;
161     public static final int SORTEDMAP = 51;
162     public static final int HASHTABLE = 32;
163
164     public static final int COLLECTION = 33;
165
166     public static final int NULL = 33;
167
168     public static final int OID = 34;
169
170
171     public static final String JavaDoc GEN_START = "HYPERDRIVE_";
172     // all generated class names must start with this string
173
public static final String JavaDoc GEN_OID_START = "HYPERDRIVE_OID_";
174     public static final String JavaDoc GEN_STATE_START = "HYPERDRIVE_STATE_";
175     public static final String JavaDoc OID_STRING_SEPERATOR = "-";
176     public static final char OID_CHAR_SEPERATOR = '-';
177
178     public static final String JavaDoc STATE_METHOD_STRING = "getStringField";
179     public static final String JavaDoc STATE_METHOD_OBJECT = "getInternalObjectField";
180     public static final String JavaDoc STATE_METHOD_BOOLEAN = "getBooleanField";
181     public static final String JavaDoc STATE_METHOD_BYTE = "getByteField";
182     public static final String JavaDoc STATE_METHOD_SHORT = "getShortField";
183     public static final String JavaDoc STATE_METHOD_INT = "getIntField";
184     public static final String JavaDoc STATE_METHOD_LONG = "getLongField";
185     public static final String JavaDoc STATE_METHOD_FLOAT = "getFloatField";
186     public static final String JavaDoc STATE_METHOD_DOUBLE = "getDoubleField";
187     public static final String JavaDoc STATE_METHOD_CHAR = "getCharField";
188
189     public static final String JavaDoc EJB_JDBC_PRE_PROCESSOR = "com.versant.core.metadata.EJBAnnotationProcessor";
190
191 }
192
Popular Tags