1 // license-header java merge-point
2 //
3 // Attention: generated code (by Metafacade.vsl) - do not modify!
4 //
5 package org.andromda.cartridges.hibernate.metafacades;
6
7 import java.util.Collection;
8 import org.andromda.metafacades.uml.Entity;
9
10 /**
11 * Represents an hibernate persistent entity.
12 *
13 * Metafacade interface to be used by AndroMDA cartridges.
14 */
15 public interface HibernateEntity
16 extends Entity
17 {
18 /**
19 * Indicates the metafacade type (used for metafacade mappings).
20 *
21 * @return boolean always <code>true</code>
22 */
23 public boolean isHibernateEntityMetaType();
24
25 /**
26 * Return all the user defined operations for this entity. Used when leafImpl is true.
27 * @return Collection
28 */
29 public Collection getAllBusinessOperations();
30
31 /**
32 * EhCache property. Defines the maximum number of objects that will be created in memory.
33 * @return int
34 */
35 public int getEhCacheMaxElementsInMemory();
36
37 /**
38 * EhCache property. Defines the time to idle for an element before it expires.
39 * @return int
40 */
41 public int getEhCacheTimeToIdleSeconds();
42
43 /**
44 * EhCache property. Defines the time to live for an element before it expires.
45 * @return int
46 */
47 public int getEhCacheTimeToLiveSeconds();
48
49 /**
50 * The name of the implementation class.
51 * @return String
52 */
53 public String getEntityImplementationName();
54
55 /**
56 * The name used for the hibernate entity.
57 * @return String
58 */
59 public String getEntityName();
60
61 /**
62 * TODO: Model Documentation for
63 * org.andromda.cartridges.hibernate.metafacades.HibernateEntity.fullyQualifiedEntityImplementationName
64 * @return String
65 */
66 public String getFullyQualifiedEntityImplementationName();
67
68 /**
69 * TODO: Model Documentation for
70 * org.andromda.cartridges.hibernate.metafacades.HibernateEntity.fullyQualifiedEntityName
71 * @return String
72 */
73 public String getFullyQualifiedEntityName();
74
75 /**
76 * Cache policy for the entity. Posible values are read-write, nonstrict-read-write, read-only
77 * @return String
78 */
79 public String getHibernateCacheType();
80
81 /**
82 * TODO: Model Documentation for
83 * org.andromda.cartridges.hibernate.metafacades.HibernateEntity.hibernateDefaultCascade
84 * @return String
85 */
86 public String getHibernateDefaultCascade();
87
88 /**
89 * The name of the discriminator column. Default is class.
90 * @return String
91 */
92 public String getHibernateDiscriminatorColumn();
93
94 /**
95 * The standard length of a discriminator value. Default is 1.
96 * @return int
97 */
98 public int getHibernateDiscriminatorLength();
99
100 /**
101 * The type of the hibernate discriminator column. Default is string.
102 * @return String
103 */
104 public String getHibernateDiscriminatorType();
105
106 /**
107 * The name of the discriminator value. Default is the name of the class
108 * @return String
109 */
110 public String getHibernateDiscriminatorValue();
111
112 /**
113 * TODO: Model Documentation for
114 * org.andromda.cartridges.hibernate.metafacades.HibernateEntity.hibernateGeneratorClass
115 * @return String
116 */
117 public String getHibernateGeneratorClass();
118
119 /**
120 * Return the value of andromda.hibernate.inheritance tagged value.
121 * @return String
122 */
123 public String getHibernateInheritanceStrategy();
124
125 /**
126 * Stores the value of the Hibernate version property.
127 * @return String
128 */
129 public String getHibernateVersionProperty();
130
131 /**
132 * The SQL name of the hibernate version property.
133 * @return String
134 */
135 public String getHibernateVersionPropertySqlName();
136
137 /**
138 * Returns the mapping class name to use (this is will be 'class', 'subclass', etc) depending on
139 * whether the entity is a specialization and what type of inheritance strategy is employed.
140 * @return String
141 */
142 public String getMappingClassName();
143
144 /**
145 * Gets the sequence name.
146 * @return String
147 */
148 public String getSequenceName();
149
150 /**
151 * Gets the name of the key column if the inheritance strategy is "subclass". If the strategy
152 * is not "subclass" this returns null.
153 * @return String
154 */
155 public String getSubclassKeyColumn();
156
157 /**
158 * TODO: Model Documentation for
159 * org.andromda.cartridges.hibernate.metafacades.HibernateEntity.version
160 * @return int
161 */
162 public int getVersion();
163
164 /**
165 * TODO: Model Documentation for
166 * org.andromda.cartridges.hibernate.metafacades.HibernateEntity.xmlTagName
167 * @return String
168 */
169 public String getXmlTagName();
170
171 /**
172 * Indicates whether or not any entity operations are present.
173 * @return boolean
174 */
175 public boolean isBusinessOperationsPresent();
176
177 /**
178 * Specifies if hibernate dynamic-insert will be enabled / disabled for this entity
179 * @return boolean
180 */
181 public boolean isDynamicInsert();
182
183 /**
184 * Specifies if hibernate dynamic-update will be enabled / disabled for this entity
185 * @return boolean
186 */
187 public boolean isDynamicUpdate();
188
189 /**
190 * EhCache property. Defines if elements are eternal.
191 * @return boolean
192 */
193 public boolean isEhCacheEternal();
194
195 /**
196 * EhCache property. Defines if elements can overflow to disk
197 * @return boolean
198 */
199 public boolean isEhCacheOverflowToDisk();
200
201 /**
202 * Indicates whether or not hibernate generator class for this SpringEntity is foreign or not.
203 * @return boolean
204 */
205 public boolean isForeignHibernateGeneratorClass();
206
207 /**
208 * Specifies whether the cache for this entity is to be distributed.
209 * @return boolean
210 */
211 public boolean isHibernateCacheDistributed();
212
213 /**
214 * Return true if the hibernate inheritance strategy as specified by the tagged value
215 * andromda_inheritance_strategy is defined as class.
216 * @return boolean
217 */
218 public boolean isHibernateInheritanceClass();
219
220 /**
221 * Return true if the hibernate inheritance strategy as specified by the tagged value
222 * andromda_inheritance_strategy is defined as concrete.
223 * @return boolean
224 */
225 public boolean isHibernateInheritanceConcrete();
226
227 /**
228 * Return true if the hibernate inheritance strategy as specified by the tagged value
229 * andromda_inheritance_strategy is defined as interface.
230 * @return boolean
231 */
232 public boolean isHibernateInheritanceInterface();
233
234 /**
235 * Return true if the hibernate inheritance strategy as specified by the tagged value
236 * andromda_inheritance_strategy is defined as subclass.
237 * @return boolean
238 */
239 public boolean isHibernateInheritanceSubclass();
240
241 /**
242 * TODO: Model Documentation for
243 * org.andromda.cartridges.hibernate.metafacades.HibernateEntity.hibernateInheritanceUnionSubClass
244 * @return boolean
245 */
246 public boolean isHibernateInheritanceUnionSubClass();
247
248 /**
249 * TODO: Model Documentation for
250 * org.andromda.cartridges.hibernate.metafacades.HibernateEntity.hibernateProxy
251 * @return boolean
252 */
253 public boolean isHibernateProxy();
254
255 /**
256 * Specifies whether the entity should be loaded lazily.
257 * @return boolean
258 */
259 public boolean isLazy();
260
261 /**
262 * Indicates whether or not the mapping for the the entity requires the properties of the super
263 * entity to be included within the mapping. If this evalutes to true, then the properties of
264 * this entity would be rendered into the specialization's mapping file.
265 * @return boolean
266 */
267 public boolean isMappingRequiresSuperProperties();
268
269 /**
270 * Indicates if this entity requires a mapping of its own.
271 * @return boolean
272 */
273 public boolean isRequiresMapping();
274
275 /**
276 * Indicates if the entity requires specialization mappng. This happens when the inheritance
277 * strategy is "subclass", or "class".
278 * @return boolean
279 */
280 public boolean isRequiresSpecializationMapping();
281
282 /**
283 * Indicates whether or not the hibernate generator class is specified as "sequence".
284 * @return boolean
285 */
286 public boolean isSequenceHibernateGeneratorClass();
287
288 /**
289 * Indicates if a table is required for this entity (sometimes it will not be depending on the
290 * inheritance strategy used).
291 * @return boolean
292 */
293 public boolean isTableRequired();
294 }