1 package org.andromda.cartridges.hibernate;
2
3 import org.andromda.core.profile.Profile;
4 import org.andromda.metafacades.uml.UMLProfile;
5
6
7 /**
8 * The Hibernate profile. Contains the profile information (tagged values, and stereotypes) for the Hibernate
9 * cartridge.
10 *
11 * @author Chad Brandon
12 * @author Carlos Cuenca
13 */
14 public class HibernateProfile
15 extends UMLProfile
16 {
17 /**
18 * The Profile instance from which we retrieve the mapped profile names.
19 */
20 private static final Profile profile = Profile.instance();
21
22 /* ----------------- Stereotypes -------------------- */
23 /* ----------------- Tagged Values -------------------- */
24
25 /**
26 * andromda_hibernate_xml_tagName
27 * Tag attached to entities, attributes, and/or association ends to specify the
28 * name of the XML node to generate when v3 XML Persistence is activated.
29 */
30 public static final String TAGGEDVALUE_HIBERNATE_XML_TAG_NAME = profile.get("HIBERNATE_XML_TAG_NAME");
31
32 /**
33 * andromda_hibernate_xml_embed
34 * Tag attached to association ends to determine if the associated entity should be embed
35 * in as XML when v3 XML Persistence is activated.
36 */
37 public static final String TAGGEDVALUE_HIBERNATE_XML_EMBED = profile.get("HIBERNATE_XML_EMBED");
38
39 /**
40 * andromda_hibernate_generator_class: Stores the hibernate generator class.
41 */
42 public static final String TAGGEDVALUE_HIBERNATE_GENERATOR_CLASS = profile.get("HIBERNATE_GENERATOR_CLASS");
43
44 /**
45 * andromda_hibernate_query: Stores a hibernate query string.
46 */
47 public static final String TAGGEDVALUE_HIBERNATE_QUERY = profile.get("HIBERNATE_QUERY");
48
49 /**
50 * andromda_hibernate_query_useNamedParameters
51 * Define whether the marked finder will use named parameters or positional parameters.
52 */
53 public static final String TAGGEDVALUE_HIBERNATE_USE_NAMED_PARAMETERS =
54 profile.get("HIBERNATE_USE_NAMED_PARAMETERS");
55
56 /**
57 * andromda_ejb_viewType: Stores the viewtype of the Hibernate Session EJB.
58 */
59 public static final String TAGGEDVALUE_EJB_VIEWTYPE = profile.get("EJB_VIEWTYPE");
60
61 /**
62 * andromda_ejb_transaction_type: Stores the EJB service transaction type.
63 */
64 public static final String TAGGEDVALUE_EJB_TRANSACTION_TYPE = profile.get("EJB_TRANSACTION_TYPE");
65
66 /**
67 * andromda_hibernate_lazy
68 * Stores the aggregation kind (lazy/eager) of the Hibernate Session EJB.
69 */
70 public static final String TAGGEDVALUE_HIBERNATE_LAZY = profile.get("HIBERNATE_LAZY");
71
72 /**
73 * andromda_hibernate_inheritance
74 * Support for hibernate inheritance strategy, supported values are <ul> <li>class : one table per base class</li>
75 * <li>subclass : one table per subclass</li> <li>concrete : one table per class, subclasses may implement subclass
76 * or joined-subclass</li> <li>union-subclass: generate per concrete class with union-subclass mapping</li> <li>
77 * interface : generate interface and put attributes etc on subclasses</li> </ul> See Hibernate documentation for
78 * specific details.
79 */
80 public static final String TAGGEDVALUE_HIBERNATE_INHERITANCE = profile.get("HIBERNATE_INHERITANCE");
81
82 /**
83 * andromda_hibernate_outerjoin
84 * Defines outer join fetching on many to one and one to one associations
85 */
86 public static final String TAGGEDVALUE_HIBERNATE_OUTER_JOIN = profile.get("HIBERNATE_OUTER_JOIN");
87
88 /**
89 * andromda_hibernate_query_useCache
90 * Defines if a query within a finder method should use the cache
91 */
92 public static final String TAGGEDVALUE_HIBERNATE_USE_QUERY_CACHE = profile.get("HIBERNATE_USE_QUERY_CACHE");
93
94 /**
95 * andromda_hibernate_entity_cache
96 * Defines the cache type for the Entity
97 */
98 public static final String TAGGEDVALUE_HIBERNATE_ENTITY_CACHE = profile.get("HIBERNATE_ENTITY_CACHE");
99
100 /**
101 * andromda_hibernate_entity_dynamicInsert
102 * Defines if the entity will limit the SQL insert statement to properties with values
103 */
104 public static final String TAGGEDVALUE_HIBERNATE_ENTITY_DYNAMIC_INSERT =
105 profile.get("HIBERNATE_ENTITY_DYNAMIC_INSERT");
106
107 /**
108 * andromda_hibernate_entity_dynamicUpdate
109 * Defines if the entity will limit the SQL update statements to properties that are modified
110 */
111 public static final String TAGGEDVALUE_HIBERNATE_ENTITY_DYNAMIC_UPDATE =
112 profile.get("HIBERNATE_ENTITY_DYNAMIC_UPDATE");
113
114 /**
115 * andromda_hibernate_association_cache
116 * Defines the cache type for an association
117 */
118 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_CACHE = profile.get("HIBERNATE_ASSOCIATION_CACHE");
119
120 /**
121 * andromda_hibernate_entity_proxy: Defines if the entity has a proxy
122 */
123 public static final String TAGGEDVALUE_HIBERNATE_PROXY = profile.get("HIBERNATE_PROXY");
124
125 /**
126 * andromda_hibernate_ehcache_maxElementsInMemory
127 * Defines the maximum number of objects that will be created in memory
128 */
129 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_MAX_ELEMENTS =
130 profile.get("HIBERNATE_EHCACHE_MAX_ELEMENTS");
131
132 /**
133 * andromda_hibernate_ehcache_eternal
134 * Defines if elements are eternal.
135 */
136 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_ETERNAL = profile.get("HIBERNATE_EHCACHE_ETERNAL");
137
138 /**
139 * andromda_hibernate_ehcache_timeToIdleSeconds
140 * Defines the time to idle for an element before it expires.
141 */
142 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_TIME_TO_IDLE =
143 profile.get("HIBERNATE_EHCACHE_TIME_TO_IDLE");
144
145 /**
146 * andromda_hibernate_ehcache_timeToLiveSeconds
147 * Defines the time to live for an element before it expires.
148 */
149 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_TIME_TO_LIVE =
150 profile.get("HIBERNATE_EHCACHE_TIME_TO_LIVE");
151
152 /**
153 * andromda_hibernate_ehcache_overflowToDisk
154 * Defines if elements can overflow to disk.
155 */
156 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_OVERFLOW_TO_DISK =
157 profile.get("HIBERNATE_EHCACHE_OVERFLOW_TO_DISK");
158
159 /**
160 * andromda_hibernate_entity_cache_distributed
161 * Defines if the cache for this entity is to be distributed.
162 */
163 public static final String TAGGEDVALUE_HIBERNATE_ENTITYCACHE_DISTRIBUTED =
164 profile.get("HIBERNATE_ENTITYCACHE_DISTRIBUTED");
165
166 /**
167 * andromda_hibernate_association_cache_distributed
168 * Defines if the cache for this association is to be distributed.
169 */
170 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATIONCACHE_DISTRIBUTED =
171 profile.get("HIBERNATE_ASSOCIATIONCACHE_DISTRIBUTED");
172
173 /**
174 * andromda_hibernate_collection_type
175 * Defines the association collection type
176 */
177 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_COLLECTION_TYPE =
178 profile.get("HIBERNATE_ASSOCIATION_COLLECTION_TYPE");
179
180 /**
181 * andromda_hibernate_sort_type: Defines the association sort type.
182 */
183 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_SORT_TYPE =
184 profile.get("HIBERNATE_ASSOCIATION_SORT_TYPE");
185
186 /**
187 * andromda_hibernate_orderByColumns
188 * Defines the association order by columns names.
189 */
190 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_ORDER_BY_COLUMNS =
191 profile.get("HIBERNATE_ASSOCIATION_ORDER_BY_COLUMNS");
192
193 /**
194 * andromda_hibernate_whereClause: Defines the association where clause.
195 */
196 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_WHERE_CLAUSE =
197 profile.get("HIBERNATE_ASSOCIATION_WHERE_CLAUSE");
198
199 /**
200 * andromda_hibernate_collection_index
201 * Defines the index column for hibernate indexed collections
202 */
203 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_INDEX = profile.get("HIBERNATE_ASSOCIATION_INDEX");
204
205 /**
206 * andromda_hibernate_collection_index_type
207 * Defines the index column type for hibernate indexed collections
208 */
209 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_INDEX_TYPE =
210 profile.get("HIBERNATE_ASSOCIATION_INDEX_TYPE");
211
212 /**
213 * andromda_hibernate_version
214 * Defines the tagged value for hibernate version property on entities
215 */
216 public static final String TAGGEDVALUE_HIBERNATE_VERSION_PROPERTY = profile.get("HIBERNATE_VERSION_PROPERTY");
217
218 /**
219 * andromda_hibernate_cascade
220 * Defines the tagged value for hibernate cascade on an association end
221 */
222 public static final String TAGGEDVALUE_HIBERNATE_CASCADE = profile.get("HIBERNATE_CASCADE");
223
224 /**
225 * andromda_hibernate_formula: Stores sql formula for an attribute.
226 */
227 public static final String TAGGEDVALUE_HIBERNATE_FORMULA = profile.get("HIBERNATE_FORMULA");
228
229 /**
230 * andromda_persistence_discriminator_column_name
231 * Column name of the discriminator-column
232 */
233 public static final String TAGGEDVALUE_ENTITY_DISCRIMINATOR_COLUMN =
234 profile.get("ENTITY_DISCRIMINATOR_COLUMN");
235
236 /**
237 * andromda_persistence_discriminator_type
238 * Column type of the discriminator-column
239 */
240 public static final String TAGGEDVALUE_ENTITY_DISCRIMINATOR_TYPE = profile.get("ENTITY_DISCRIMINATOR_TYPE");
241
242 /**
243 * andromda_persistence_discriminator_value
244 * Value of the class for the discriminator-column
245 */
246 public static final String TAGGEDVALUE_ENTITY_DISCRIMINATOR_VALUE = profile.get("ENTITY_DISCRIMINATOR_VALUE");
247
248 /**
249 * andromda_hibernate_property_insert
250 * Specifies whether a mapped column should be included in SQL INSERT statements.
251 */
252 public static final String TAGGEDVALUE_HIBERNATE_PROPERTY_INSERT = profile.get("HIBERNATE_PROPERTY_INSERT");
253
254 /**
255 * andromda_hibernate_property_update
256 * Specifies whether a mapped column should be included in SQL UPDATE statements.
257 */
258 public static final String TAGGEDVALUE_HIBERNATE_PROPERTY_UPDATE = profile.get("HIBERNATE_PROPERTY_UPDATE");
259
260 }