1 package org.andromda.cartridges.hibernate.metafacades;
2
3
4 /**
5 * Stores Globals specific to the Hibernate cartridge.
6 *
7 * @author Chad Brandon
8 * @author Wouter Zoons
9 */
10 public class HibernateGlobals
11 {
12 /**
13 * Denotes whether or not subclasses require their own mapping file.
14 */
15 static public final String HIBERNATE_MAPPING_STRATEGY = "hibernateMappingStrategy";
16
17 /**
18 * A mapping file per subclass.
19 */
20 static public final String HIBERNATE_MAPPING_STRATEGY_SUBCLASS = "subclass";
21
22 /**
23 * A mapping file per hierarchy.
24 */
25 static public final String HIBERNATE_MAPPING_STRATEGY_HIERARCHY = "hierachy";
26
27 /**
28 * Indicates if "XML Persistence" code generation is enabled. Requires Hibernate 3.
29 */
30 static public final String HIBERNATE_XML_PERSISTENCE = "hibernateXMLPersistence";
31
32 /**
33 * Determines if the identifier attribute on an entity is generated as an attribute
34 * or as a separate element.
35 */
36 static final String HIBERNATE_XML_PERSISTENCE_ID_AS_ATTRIBUTE = "hibernateXMLPersistIDAsAttribute";
37
38 /**
39 * Hibernate version to use.
40 */
41 static public final String HIBERNATE_VERSION = "hibernateVersion";
42
43 /**
44 * The version for Hibernate 2.
45 */
46 public static final String HIBERNATE_VERSION_2 = "2";
47
48 /**
49 * The version for Hibernate 3.
50 */
51 public static final String HIBERNATE_VERSION_3 = "3";
52
53 /**
54 * EJB implementation class suffix.
55 */
56 final static String EJB_IMPLEMENTATION_SUFFIX = "Bean";
57
58 /**
59 * Represents the hibernate <code>delete</code> cascade option.
60 */
61 static final String HIBERNATE_CASCADE_DELETE = "delete";
62
63 /**
64 * Represents the hibernate <code>all-delete-orphan</code> cascade option.
65 */
66 static final String HIBERNATE_CASCADE_ALL_DELETE_ORPHAN = "all-delete-orphan";
67
68 /**
69 * Represents the hibernate <code>save-update</code> cascade option.
70 */
71 static final String HIBERNATE_CASCADE_SAVE_UPDATE = "save-update";
72
73 /**
74 * Represents the hibernate <code>all</code> cascade option.
75 */
76 static final String HIBERNATE_CASCADE_ALL = "all";
77
78 /**
79 * Represents the hibernate <code>none</code> cascade option.
80 */
81 static final String HIBERNATE_CASCADE_NONE = "none";
82
83 /**
84 * The property used to specify the implementation operation name prefix (on
85 * services).
86 */
87 static final String PROPERTY_IMPLEMENTATION_OPERATION_NAME_PREFIX = "implementationOperationNamePrefix";
88
89 /**
90 * The namespace property storing default ehCache maxElementsInMemory
91 * parameter
92 */
93 static final String HIBERNATE_EHCACHE_MAX_ELEMENTS = "ehCacheMaxElementsInMemory";
94
95 /**
96 * The namespace property storing default ehCache eternal parameter
97 */
98 static final String HIBERNATE_EHCACHE_ETERNAL = "ehCacheEternal";
99
100 /**
101 * The namespace property storing default ehCache eternal parameter
102 */
103 static final String HIBERNATE_EHCACHE_TIME_TO_IDLE = "ehCacheTimeToIdleSeconds";
104
105 /**
106 * The namespace property storing default ehCache eternal parameter
107 */
108 static final String HIBERNATE_EHCACHE_TIME_TO_LIVE = "ehCacheTimeToLiveSeconds";
109
110 /**
111 * The namespace property storing default ehCache eternal parameter
112 */
113 static final String HIBERNATE_EHCACHE_OVERFLOW_TO_DISK = "ehCacheOverflowToDisk";
114
115 /**
116 * The namespace property storing whether distributed caching is turned on at all.
117 */
118 static final String HIBERNATE_ENTITYCACHE_DISTRIBUTED = "hibernateEnableDistributedCache";
119
120 /**
121 * The namespace property storing default dynamic-insert parameter
122 */
123 static final String HIBERNATE_ENTITY_DYNAMIC_INSERT = "hibernateEntityDynamicInsert";
124
125 /**
126 * The namespace property storing default dynamic-update parameter
127 */
128 static final String HIBERNATE_ENTITY_DYNAMIC_UPDATE = "hibernateEntityDynamicUpdate";
129
130 /**
131 * The namespace property storing default collection type for associations
132 */
133 static final String HIBERNATE_ASSOCIATION_COLLECTION_TYPE = "hibernateAssociationCollectionType";
134
135 /**
136 * The namespace property storing default sort method for collections
137 */
138 static final String HIBERNATE_ASSOCIATION_SORT_TYPE = "hibernateAssociationSortType";
139
140 /**
141 * The namespace property to specify the pattern for determining the entity
142 * name.
143 */
144 static final String ENTITY_NAME_PATTERN = "entityNamePattern";
145
146 /**
147 * The property which stores the pattern defining the entity implementation
148 * name.
149 */
150 static final String ENTITY_IMPLEMENTATION_NAME_PATTERN = "entityImplementationNamePattern";
151
152 /**
153 * The property which stores the pattern defining the embedded value
154 * implementation name.
155 */
156 static final String EMBEDDED_VALUE_IMPLEMENTATION_NAME_PATTERN = "embeddedValueImplementationNamePattern";
157
158 /**
159 * The property which defines a default value for hibernate entities
160 * versioning.
161 */
162 static final String HIBERNATE_VERSION_PROPERTY = "versionProperty";
163
164 /**
165 * The 'list' type implementation to use.
166 */
167 static final String LIST_TYPE_IMPLEMENTATION = "listTypeImplementation";
168
169 /**
170 * The 'set' type implementation to use.
171 */
172 static final String SET_TYPE_IMPLEMENTATION = "setTypeImplementation";
173
174 /**
175 * The 'map' type implementation to use.
176 */
177 static final String MAP_TYPE_IMPLEMENTATION = "mapTypeImplementation";
178
179 /**
180 * The 'bag' type implementation to use.
181 */
182 static final String BAG_TYPE_IMPLEMENTATION = "bagTypeImplementation";
183
184 /**
185 * A flag indicating whether or not specific (java.util.Set, java.util.List,
186 * etc) collection interfaces should be used in assocation mutators and
187 * accessors or whether the generic java.util.Collection interface should be
188 * used.
189 */
190 static final String SPECIFIC_COLLECTION_INTERFACES = "specificCollectionInterfaces";
191
192 /**
193 * The property that defines the default collection interface, this is the
194 * interface used if the property defined by
195 * {@link #SPECIFIC_COLLECTION_INTERFACES} is true.
196 */
197 static final String DEFAULT_COLLECTION_INTERFACE = "defaultCollectionInterface";
198
199 /**
200 * The default Hibernate dicriminator columnname
201 */
202 static final String ENTITY_DISCRIMINATOR_COLUMN = "defaultEntityDiscriminatorColumn";
203
204 /**
205 * The default Hibernate dicriminator columntype
206 */
207 static final String ENTITY_DISCRIMINATOR_TYPE = "defaultEntityDiscriminatorType";
208 }