1
2
3
4 package org.andromda.cartridges.ejb.metafacades;
5
6 /***
7 * MetafacadeLogic for org.andromda.cartridges.ejb.metafacades.EJBEntityAttributeFacade
8 *
9 * @see org.andromda.cartridges.ejb.metafacades.EJBEntityAttributeFacade
10 */
11 public abstract class EJBEntityAttributeFacadeLogic
12 extends org.andromda.core.metafacade.MetafacadeBase
13 implements org.andromda.cartridges.ejb.metafacades.EJBEntityAttributeFacade
14 {
15
16 protected Object metaObject;
17
18 public EJBEntityAttributeFacadeLogic(Object metaObject, String context)
19 {
20 super(metaObject, getContext(context));
21 this.superEntityAttribute =
22 (org.andromda.metafacades.uml.EntityAttribute)
23 org.andromda.core.metafacade.MetafacadeFactory.getInstance().createFacadeImpl(
24 "org.andromda.metafacades.uml.EntityAttribute",
25 metaObject,
26 getContext(context));
27 this.metaObject = metaObject;
28 }
29
30 /***
31 * Gets the context for this metafacade logic instance.
32 */
33 private static String getContext(String context)
34 {
35 if (context == null)
36 {
37 context = "org.andromda.cartridges.ejb.metafacades.EJBEntityAttributeFacade";
38 }
39 return context;
40 }
41
42 private org.andromda.metafacades.uml.EntityAttribute superEntityAttribute;
43 private boolean superEntityAttributeInitialized = false;
44
45 /***
46 * Gets the org.andromda.metafacades.uml.EntityAttribute parent instance.
47 */
48 private org.andromda.metafacades.uml.EntityAttribute getSuperEntityAttribute()
49 {
50 if (!this.superEntityAttributeInitialized)
51 {
52 ((org.andromda.core.metafacade.MetafacadeBase)superEntityAttribute).setMetafacadeContext(this.getMetafacadeContext());
53 this.superEntityAttributeInitialized = true;
54 }
55 return superEntityAttribute;
56 }
57
58 /***
59 * @see org.andromda.core.metafacade.MetafacadeBase
60 */
61 public void resetMetafacadeContext(String context)
62 {
63 if (!this.contextRoot)
64 {
65 context = getContext(context);
66 setMetafacadeContext (context);
67 if (this.superEntityAttributeInitialized)
68 {
69 ((org.andromda.core.metafacade.MetafacadeBase)superEntityAttribute).resetMetafacadeContext(context);
70 }
71 }
72 }
73
74 /***
75 * @see org.andromda.cartridges.ejb.metafacades.EJBEntityAttributeFacade
76 */
77 public boolean isEJBEntityAttributeFacadeMetaType()
78 {
79 return true;
80 }
81
82
83
84 /***
85 * @see org.andromda.cartridges.ejb.metafacades.EJBEntityAttributeFacade#getTransactionType()
86 */
87 protected abstract java.lang.String handleGetTransactionType();
88
89 private void handleGetTransactionType1aPreCondition()
90 {
91 }
92
93 private void handleGetTransactionType1aPostCondition()
94 {
95 }
96
97 private java.lang.String __transactionType1a;
98 private boolean __transactionType1aSet = false;
99
100 public final java.lang.String getTransactionType()
101 {
102 java.lang.String transactionType1a = this.__transactionType1a;
103 if (!this.__transactionType1aSet)
104 {
105 handleGetTransactionType1aPreCondition();
106 transactionType1a = handleGetTransactionType();
107 handleGetTransactionType1aPostCondition();
108 this.__transactionType1a = transactionType1a;
109 if (isMetafacadePropertyCachingEnabled())
110 {
111 this.__transactionType1aSet = true;
112 }
113 }
114 return transactionType1a;
115 }
116
117 /***
118 * @see org.andromda.metafacades.uml.EntityAttribute
119 */
120 public boolean isEntityAttributeMetaType()
121 {
122 return true;
123 }
124
125 /***
126 * @see org.andromda.metafacades.uml.AttributeFacade
127 */
128 public boolean isAttributeFacadeMetaType()
129 {
130 return true;
131 }
132
133 /***
134 * @see org.andromda.metafacades.uml.ModelElementFacade
135 */
136 public boolean isModelElementFacadeMetaType()
137 {
138 return true;
139 }
140
141
142
143 public java.lang.Object findTaggedValue(java.lang.String name, boolean follow)
144 {
145 return this.getSuperEntityAttribute().findTaggedValue(name, follow);
146 }
147
148
149 public java.lang.String getDefaultValue()
150 {
151 return this.getSuperEntityAttribute().getDefaultValue();
152 }
153
154
155 public org.andromda.metafacades.uml.EnumerationFacade getEnumeration()
156 {
157 return this.getSuperEntityAttribute().getEnumeration();
158 }
159
160
161 public java.lang.String getEnumerationLiteralParameters()
162 {
163 return this.getSuperEntityAttribute().getEnumerationLiteralParameters();
164 }
165
166
167 public java.lang.String getEnumerationValue()
168 {
169 return this.getSuperEntityAttribute().getEnumerationValue();
170 }
171
172
173 public java.lang.String getGetterName()
174 {
175 return this.getSuperEntityAttribute().getGetterName();
176 }
177
178
179 public java.lang.String getGetterSetterTypeName()
180 {
181 return this.getSuperEntityAttribute().getGetterSetterTypeName();
182 }
183
184
185 public int getLower()
186 {
187 return this.getSuperEntityAttribute().getLower();
188 }
189
190
191 public org.andromda.metafacades.uml.ClassifierFacade getOwner()
192 {
193 return this.getSuperEntityAttribute().getOwner();
194 }
195
196
197 public java.lang.String getSetterName()
198 {
199 return this.getSuperEntityAttribute().getSetterName();
200 }
201
202
203 public org.andromda.metafacades.uml.ClassifierFacade getType()
204 {
205 return this.getSuperEntityAttribute().getType();
206 }
207
208
209 public int getUpper()
210 {
211 return this.getSuperEntityAttribute().getUpper();
212 }
213
214
215 public boolean isAddOnly()
216 {
217 return this.getSuperEntityAttribute().isAddOnly();
218 }
219
220
221 public boolean isChangeable()
222 {
223 return this.getSuperEntityAttribute().isChangeable();
224 }
225
226
227 public boolean isDefaultValuePresent()
228 {
229 return this.getSuperEntityAttribute().isDefaultValuePresent();
230 }
231
232
233 public boolean isEnumerationLiteral()
234 {
235 return this.getSuperEntityAttribute().isEnumerationLiteral();
236 }
237
238
239 public boolean isEnumerationLiteralParametersExist()
240 {
241 return this.getSuperEntityAttribute().isEnumerationLiteralParametersExist();
242 }
243
244
245 public boolean isEnumerationMember()
246 {
247 return this.getSuperEntityAttribute().isEnumerationMember();
248 }
249
250
251 public boolean isMany()
252 {
253 return this.getSuperEntityAttribute().isMany();
254 }
255
256
257 public boolean isOrdered()
258 {
259 return this.getSuperEntityAttribute().isOrdered();
260 }
261
262
263 public boolean isReadOnly()
264 {
265 return this.getSuperEntityAttribute().isReadOnly();
266 }
267
268
269 public boolean isRequired()
270 {
271 return this.getSuperEntityAttribute().isRequired();
272 }
273
274
275 public boolean isStatic()
276 {
277 return this.getSuperEntityAttribute().isStatic();
278 }
279
280
281 public java.lang.String getColumnIndex()
282 {
283 return this.getSuperEntityAttribute().getColumnIndex();
284 }
285
286
287 public java.lang.String getColumnLength()
288 {
289 return this.getSuperEntityAttribute().getColumnLength();
290 }
291
292
293 public java.lang.String getColumnName()
294 {
295 return this.getSuperEntityAttribute().getColumnName();
296 }
297
298
299 public org.andromda.metafacades.uml.TypeMappings getJdbcMappings()
300 {
301 return this.getSuperEntityAttribute().getJdbcMappings();
302 }
303
304
305 public java.lang.String getJdbcType()
306 {
307 return this.getSuperEntityAttribute().getJdbcType();
308 }
309
310
311 public org.andromda.metafacades.uml.TypeMappings getSqlMappings()
312 {
313 return this.getSuperEntityAttribute().getSqlMappings();
314 }
315
316
317 public java.lang.String getSqlType()
318 {
319 return this.getSuperEntityAttribute().getSqlType();
320 }
321
322
323 public java.lang.String getUniqueGroup()
324 {
325 return this.getSuperEntityAttribute().getUniqueGroup();
326 }
327
328
329 public boolean isIdentifier()
330 {
331 return this.getSuperEntityAttribute().isIdentifier();
332 }
333
334
335 public boolean isTransient()
336 {
337 return this.getSuperEntityAttribute().isTransient();
338 }
339
340
341 public boolean isUnique()
342 {
343 return this.getSuperEntityAttribute().isUnique();
344 }
345
346
347 public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
348 {
349 this.getSuperEntityAttribute().copyTaggedValues(element);
350 }
351
352
353 public java.lang.Object findTaggedValue(java.lang.String tagName)
354 {
355 return this.getSuperEntityAttribute().findTaggedValue(tagName);
356 }
357
358
359 public java.util.Collection findTaggedValues(java.lang.String tagName)
360 {
361 return this.getSuperEntityAttribute().findTaggedValues(tagName);
362 }
363
364
365 public java.util.Collection getConstraints()
366 {
367 return this.getSuperEntityAttribute().getConstraints();
368 }
369
370
371 public java.util.Collection getConstraints(java.lang.String kind)
372 {
373 return this.getSuperEntityAttribute().getConstraints(kind);
374 }
375
376
377 public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
378 {
379 return this.getSuperEntityAttribute().getDocumentation(indent, lineLength);
380 }
381
382
383 public java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
384 {
385 return this.getSuperEntityAttribute().getDocumentation(indent, lineLength, htmlStyle);
386 }
387
388
389 public java.lang.String getDocumentation(java.lang.String indent)
390 {
391 return this.getSuperEntityAttribute().getDocumentation(indent);
392 }
393
394
395 public java.lang.String getFullyQualifiedName(boolean modelName)
396 {
397 return this.getSuperEntityAttribute().getFullyQualifiedName(modelName);
398 }
399
400
401 public java.lang.String getFullyQualifiedName()
402 {
403 return this.getSuperEntityAttribute().getFullyQualifiedName();
404 }
405
406
407 public java.lang.String getFullyQualifiedNamePath()
408 {
409 return this.getSuperEntityAttribute().getFullyQualifiedNamePath();
410 }
411
412
413 public java.lang.String getId()
414 {
415 return this.getSuperEntityAttribute().getId();
416 }
417
418
419 public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
420 {
421 return this.getSuperEntityAttribute().getLanguageMappings();
422 }
423
424
425 public org.andromda.metafacades.uml.ModelFacade getModel()
426 {
427 return this.getSuperEntityAttribute().getModel();
428 }
429
430
431 public java.lang.String getName()
432 {
433 return this.getSuperEntityAttribute().getName();
434 }
435
436
437 public org.andromda.metafacades.uml.ModelElementFacade getPackage()
438 {
439 return this.getSuperEntityAttribute().getPackage();
440 }
441
442
443 public java.lang.String getPackageName(boolean modelName)
444 {
445 return this.getSuperEntityAttribute().getPackageName(modelName);
446 }
447
448
449 public java.lang.String getPackageName()
450 {
451 return this.getSuperEntityAttribute().getPackageName();
452 }
453
454
455 public java.lang.String getPackagePath()
456 {
457 return this.getSuperEntityAttribute().getPackagePath();
458 }
459
460
461 public org.andromda.metafacades.uml.PackageFacade getRootPackage()
462 {
463 return this.getSuperEntityAttribute().getRootPackage();
464 }
465
466
467 public java.util.Collection getSourceDependencies()
468 {
469 return this.getSuperEntityAttribute().getSourceDependencies();
470 }
471
472
473 public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
474 {
475 return this.getSuperEntityAttribute().getStateMachineContext();
476 }
477
478
479 public java.util.Collection getStereotypeNames()
480 {
481 return this.getSuperEntityAttribute().getStereotypeNames();
482 }
483
484
485 public java.util.Collection getStereotypes()
486 {
487 return this.getSuperEntityAttribute().getStereotypes();
488 }
489
490
491 public java.util.Collection getTaggedValues()
492 {
493 return this.getSuperEntityAttribute().getTaggedValues();
494 }
495
496
497 public java.util.Collection getTargetDependencies()
498 {
499 return this.getSuperEntityAttribute().getTargetDependencies();
500 }
501
502
503 public java.lang.Object getTemplateParameter(java.lang.String parameterName)
504 {
505 return this.getSuperEntityAttribute().getTemplateParameter(parameterName);
506 }
507
508
509 public java.util.Collection getTemplateParameters()
510 {
511 return this.getSuperEntityAttribute().getTemplateParameters();
512 }
513
514
515 public java.lang.String getVisibility()
516 {
517 return this.getSuperEntityAttribute().getVisibility();
518 }
519
520
521 public boolean hasExactStereotype(java.lang.String stereotypeName)
522 {
523 return this.getSuperEntityAttribute().hasExactStereotype(stereotypeName);
524 }
525
526
527 public boolean hasStereotype(java.lang.String stereotypeName)
528 {
529 return this.getSuperEntityAttribute().hasStereotype(stereotypeName);
530 }
531
532
533 public boolean isBindingDependenciesPresent()
534 {
535 return this.getSuperEntityAttribute().isBindingDependenciesPresent();
536 }
537
538
539 public boolean isConstraintsPresent()
540 {
541 return this.getSuperEntityAttribute().isConstraintsPresent();
542 }
543
544
545 public boolean isTemplateParametersPresent()
546 {
547 return this.getSuperEntityAttribute().isTemplateParametersPresent();
548 }
549
550
551 public java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
552 {
553 return this.getSuperEntityAttribute().translateConstraint(name, translation);
554 }
555
556
557 public java.lang.String[] translateConstraints(java.lang.String translation)
558 {
559 return this.getSuperEntityAttribute().translateConstraints(translation);
560 }
561
562
563 public java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
564 {
565 return this.getSuperEntityAttribute().translateConstraints(kind, translation);
566 }
567
568 /***
569 * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
570 */
571 public void initialize()
572 {
573 this.getSuperEntityAttribute().initialize();
574 }
575
576 /***
577 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
578 */
579 public Object getValidationOwner()
580 {
581 Object owner = this.getSuperEntityAttribute().getValidationOwner();
582 return owner;
583 }
584
585 /***
586 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
587 */
588 public String getValidationName()
589 {
590 String name = this.getSuperEntityAttribute().getValidationName();
591 return name;
592 }
593
594 /***
595 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
596 */
597 public void validateInvariants(java.util.Collection validationMessages)
598 {
599 this.getSuperEntityAttribute().validateInvariants(validationMessages);
600 }
601
602 /***
603 * The property that stores the name of the metafacade.
604 */
605 private static final String NAME_PROPERTY = "name";
606
607 /***
608 * @see java.lang.Object#toString()
609 */
610 public String toString()
611 {
612 final StringBuffer toString = new StringBuffer(this.getClass().getName());
613 toString.append("[");
614 try
615 {
616 toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
617 }
618 catch (final Throwable throwable)
619 {
620
621 }
622 toString.append("]");
623 return toString.toString();
624 }
625 }