View Javadoc

1   //
2   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
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) // reset context only for non-root metafacades
64          {
65              context = getContext(context);  // to have same value as in original constructor call
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      // --------------- attributes ---------------------
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     // ----------- delegates to org.andromda.metafacades.uml.EntityAttribute ------------
142     // from org.andromda.metafacades.uml.AttributeFacade
143     public java.lang.Object findTaggedValue(java.lang.String name, boolean follow)
144     {
145         return this.getSuperEntityAttribute().findTaggedValue(name, follow);
146     }
147 
148     // from org.andromda.metafacades.uml.AttributeFacade
149     public java.lang.String getDefaultValue()
150     {
151         return this.getSuperEntityAttribute().getDefaultValue();
152     }
153 
154     // from org.andromda.metafacades.uml.AttributeFacade
155     public org.andromda.metafacades.uml.EnumerationFacade getEnumeration()
156     {
157         return this.getSuperEntityAttribute().getEnumeration();
158     }
159 
160     // from org.andromda.metafacades.uml.AttributeFacade
161     public java.lang.String getEnumerationLiteralParameters()
162     {
163         return this.getSuperEntityAttribute().getEnumerationLiteralParameters();
164     }
165 
166     // from org.andromda.metafacades.uml.AttributeFacade
167     public java.lang.String getEnumerationValue()
168     {
169         return this.getSuperEntityAttribute().getEnumerationValue();
170     }
171 
172     // from org.andromda.metafacades.uml.AttributeFacade
173     public java.lang.String getGetterName()
174     {
175         return this.getSuperEntityAttribute().getGetterName();
176     }
177 
178     // from org.andromda.metafacades.uml.AttributeFacade
179     public java.lang.String getGetterSetterTypeName()
180     {
181         return this.getSuperEntityAttribute().getGetterSetterTypeName();
182     }
183 
184     // from org.andromda.metafacades.uml.AttributeFacade
185     public int getLower()
186     {
187         return this.getSuperEntityAttribute().getLower();
188     }
189 
190     // from org.andromda.metafacades.uml.AttributeFacade
191     public org.andromda.metafacades.uml.ClassifierFacade getOwner()
192     {
193         return this.getSuperEntityAttribute().getOwner();
194     }
195 
196     // from org.andromda.metafacades.uml.AttributeFacade
197     public java.lang.String getSetterName()
198     {
199         return this.getSuperEntityAttribute().getSetterName();
200     }
201 
202     // from org.andromda.metafacades.uml.AttributeFacade
203     public org.andromda.metafacades.uml.ClassifierFacade getType()
204     {
205         return this.getSuperEntityAttribute().getType();
206     }
207 
208     // from org.andromda.metafacades.uml.AttributeFacade
209     public int getUpper()
210     {
211         return this.getSuperEntityAttribute().getUpper();
212     }
213 
214     // from org.andromda.metafacades.uml.AttributeFacade
215     public boolean isAddOnly()
216     {
217         return this.getSuperEntityAttribute().isAddOnly();
218     }
219 
220     // from org.andromda.metafacades.uml.AttributeFacade
221     public boolean isChangeable()
222     {
223         return this.getSuperEntityAttribute().isChangeable();
224     }
225 
226     // from org.andromda.metafacades.uml.AttributeFacade
227     public boolean isDefaultValuePresent()
228     {
229         return this.getSuperEntityAttribute().isDefaultValuePresent();
230     }
231 
232     // from org.andromda.metafacades.uml.AttributeFacade
233     public boolean isEnumerationLiteral()
234     {
235         return this.getSuperEntityAttribute().isEnumerationLiteral();
236     }
237 
238     // from org.andromda.metafacades.uml.AttributeFacade
239     public boolean isEnumerationLiteralParametersExist()
240     {
241         return this.getSuperEntityAttribute().isEnumerationLiteralParametersExist();
242     }
243 
244     // from org.andromda.metafacades.uml.AttributeFacade
245     public boolean isEnumerationMember()
246     {
247         return this.getSuperEntityAttribute().isEnumerationMember();
248     }
249 
250     // from org.andromda.metafacades.uml.AttributeFacade
251     public boolean isMany()
252     {
253         return this.getSuperEntityAttribute().isMany();
254     }
255 
256     // from org.andromda.metafacades.uml.AttributeFacade
257     public boolean isOrdered()
258     {
259         return this.getSuperEntityAttribute().isOrdered();
260     }
261 
262     // from org.andromda.metafacades.uml.AttributeFacade
263     public boolean isReadOnly()
264     {
265         return this.getSuperEntityAttribute().isReadOnly();
266     }
267 
268     // from org.andromda.metafacades.uml.AttributeFacade
269     public boolean isRequired()
270     {
271         return this.getSuperEntityAttribute().isRequired();
272     }
273 
274     // from org.andromda.metafacades.uml.AttributeFacade
275     public boolean isStatic()
276     {
277         return this.getSuperEntityAttribute().isStatic();
278     }
279 
280     // from org.andromda.metafacades.uml.EntityAttribute
281     public java.lang.String getColumnIndex()
282     {
283         return this.getSuperEntityAttribute().getColumnIndex();
284     }
285 
286     // from org.andromda.metafacades.uml.EntityAttribute
287     public java.lang.String getColumnLength()
288     {
289         return this.getSuperEntityAttribute().getColumnLength();
290     }
291 
292     // from org.andromda.metafacades.uml.EntityAttribute
293     public java.lang.String getColumnName()
294     {
295         return this.getSuperEntityAttribute().getColumnName();
296     }
297 
298     // from org.andromda.metafacades.uml.EntityAttribute
299     public org.andromda.metafacades.uml.TypeMappings getJdbcMappings()
300     {
301         return this.getSuperEntityAttribute().getJdbcMappings();
302     }
303 
304     // from org.andromda.metafacades.uml.EntityAttribute
305     public java.lang.String getJdbcType()
306     {
307         return this.getSuperEntityAttribute().getJdbcType();
308     }
309 
310     // from org.andromda.metafacades.uml.EntityAttribute
311     public org.andromda.metafacades.uml.TypeMappings getSqlMappings()
312     {
313         return this.getSuperEntityAttribute().getSqlMappings();
314     }
315 
316     // from org.andromda.metafacades.uml.EntityAttribute
317     public java.lang.String getSqlType()
318     {
319         return this.getSuperEntityAttribute().getSqlType();
320     }
321 
322     // from org.andromda.metafacades.uml.EntityAttribute
323     public java.lang.String getUniqueGroup()
324     {
325         return this.getSuperEntityAttribute().getUniqueGroup();
326     }
327 
328     // from org.andromda.metafacades.uml.EntityAttribute
329     public boolean isIdentifier()
330     {
331         return this.getSuperEntityAttribute().isIdentifier();
332     }
333 
334     // from org.andromda.metafacades.uml.EntityAttribute
335     public boolean isTransient()
336     {
337         return this.getSuperEntityAttribute().isTransient();
338     }
339 
340     // from org.andromda.metafacades.uml.EntityAttribute
341     public boolean isUnique()
342     {
343         return this.getSuperEntityAttribute().isUnique();
344     }
345 
346     // from org.andromda.metafacades.uml.ModelElementFacade
347     public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
348     {
349         this.getSuperEntityAttribute().copyTaggedValues(element);
350     }
351 
352     // from org.andromda.metafacades.uml.ModelElementFacade
353     public java.lang.Object findTaggedValue(java.lang.String tagName)
354     {
355         return this.getSuperEntityAttribute().findTaggedValue(tagName);
356     }
357 
358     // from org.andromda.metafacades.uml.ModelElementFacade
359     public java.util.Collection findTaggedValues(java.lang.String tagName)
360     {
361         return this.getSuperEntityAttribute().findTaggedValues(tagName);
362     }
363 
364     // from org.andromda.metafacades.uml.ModelElementFacade
365     public java.util.Collection getConstraints()
366     {
367         return this.getSuperEntityAttribute().getConstraints();
368     }
369 
370     // from org.andromda.metafacades.uml.ModelElementFacade
371     public java.util.Collection getConstraints(java.lang.String kind)
372     {
373         return this.getSuperEntityAttribute().getConstraints(kind);
374     }
375 
376     // from org.andromda.metafacades.uml.ModelElementFacade
377     public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
378     {
379         return this.getSuperEntityAttribute().getDocumentation(indent, lineLength);
380     }
381 
382     // from org.andromda.metafacades.uml.ModelElementFacade
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     // from org.andromda.metafacades.uml.ModelElementFacade
389     public java.lang.String getDocumentation(java.lang.String indent)
390     {
391         return this.getSuperEntityAttribute().getDocumentation(indent);
392     }
393 
394     // from org.andromda.metafacades.uml.ModelElementFacade
395     public java.lang.String getFullyQualifiedName(boolean modelName)
396     {
397         return this.getSuperEntityAttribute().getFullyQualifiedName(modelName);
398     }
399 
400     // from org.andromda.metafacades.uml.ModelElementFacade
401     public java.lang.String getFullyQualifiedName()
402     {
403         return this.getSuperEntityAttribute().getFullyQualifiedName();
404     }
405 
406     // from org.andromda.metafacades.uml.ModelElementFacade
407     public java.lang.String getFullyQualifiedNamePath()
408     {
409         return this.getSuperEntityAttribute().getFullyQualifiedNamePath();
410     }
411 
412     // from org.andromda.metafacades.uml.ModelElementFacade
413     public java.lang.String getId()
414     {
415         return this.getSuperEntityAttribute().getId();
416     }
417 
418     // from org.andromda.metafacades.uml.ModelElementFacade
419     public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
420     {
421         return this.getSuperEntityAttribute().getLanguageMappings();
422     }
423 
424     // from org.andromda.metafacades.uml.ModelElementFacade
425     public org.andromda.metafacades.uml.ModelFacade getModel()
426     {
427         return this.getSuperEntityAttribute().getModel();
428     }
429 
430     // from org.andromda.metafacades.uml.ModelElementFacade
431     public java.lang.String getName()
432     {
433         return this.getSuperEntityAttribute().getName();
434     }
435 
436     // from org.andromda.metafacades.uml.ModelElementFacade
437     public org.andromda.metafacades.uml.ModelElementFacade getPackage()
438     {
439         return this.getSuperEntityAttribute().getPackage();
440     }
441 
442     // from org.andromda.metafacades.uml.ModelElementFacade
443     public java.lang.String getPackageName(boolean modelName)
444     {
445         return this.getSuperEntityAttribute().getPackageName(modelName);
446     }
447 
448     // from org.andromda.metafacades.uml.ModelElementFacade
449     public java.lang.String getPackageName()
450     {
451         return this.getSuperEntityAttribute().getPackageName();
452     }
453 
454     // from org.andromda.metafacades.uml.ModelElementFacade
455     public java.lang.String getPackagePath()
456     {
457         return this.getSuperEntityAttribute().getPackagePath();
458     }
459 
460     // from org.andromda.metafacades.uml.ModelElementFacade
461     public org.andromda.metafacades.uml.PackageFacade getRootPackage()
462     {
463         return this.getSuperEntityAttribute().getRootPackage();
464     }
465 
466     // from org.andromda.metafacades.uml.ModelElementFacade
467     public java.util.Collection getSourceDependencies()
468     {
469         return this.getSuperEntityAttribute().getSourceDependencies();
470     }
471 
472     // from org.andromda.metafacades.uml.ModelElementFacade
473     public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
474     {
475         return this.getSuperEntityAttribute().getStateMachineContext();
476     }
477 
478     // from org.andromda.metafacades.uml.ModelElementFacade
479     public java.util.Collection getStereotypeNames()
480     {
481         return this.getSuperEntityAttribute().getStereotypeNames();
482     }
483 
484     // from org.andromda.metafacades.uml.ModelElementFacade
485     public java.util.Collection getStereotypes()
486     {
487         return this.getSuperEntityAttribute().getStereotypes();
488     }
489 
490     // from org.andromda.metafacades.uml.ModelElementFacade
491     public java.util.Collection getTaggedValues()
492     {
493         return this.getSuperEntityAttribute().getTaggedValues();
494     }
495 
496     // from org.andromda.metafacades.uml.ModelElementFacade
497     public java.util.Collection getTargetDependencies()
498     {
499         return this.getSuperEntityAttribute().getTargetDependencies();
500     }
501 
502     // from org.andromda.metafacades.uml.ModelElementFacade
503     public java.lang.Object getTemplateParameter(java.lang.String parameterName)
504     {
505         return this.getSuperEntityAttribute().getTemplateParameter(parameterName);
506     }
507 
508     // from org.andromda.metafacades.uml.ModelElementFacade
509     public java.util.Collection getTemplateParameters()
510     {
511         return this.getSuperEntityAttribute().getTemplateParameters();
512     }
513 
514     // from org.andromda.metafacades.uml.ModelElementFacade
515     public java.lang.String getVisibility()
516     {
517         return this.getSuperEntityAttribute().getVisibility();
518     }
519 
520     // from org.andromda.metafacades.uml.ModelElementFacade
521     public boolean hasExactStereotype(java.lang.String stereotypeName)
522     {
523         return this.getSuperEntityAttribute().hasExactStereotype(stereotypeName);
524     }
525 
526     // from org.andromda.metafacades.uml.ModelElementFacade
527     public boolean hasStereotype(java.lang.String stereotypeName)
528     {
529         return this.getSuperEntityAttribute().hasStereotype(stereotypeName);
530     }
531 
532     // from org.andromda.metafacades.uml.ModelElementFacade
533     public boolean isBindingDependenciesPresent()
534     {
535         return this.getSuperEntityAttribute().isBindingDependenciesPresent();
536     }
537 
538     // from org.andromda.metafacades.uml.ModelElementFacade
539     public boolean isConstraintsPresent()
540     {
541         return this.getSuperEntityAttribute().isConstraintsPresent();
542     }
543 
544     // from org.andromda.metafacades.uml.ModelElementFacade
545     public boolean isTemplateParametersPresent()
546     {
547         return this.getSuperEntityAttribute().isTemplateParametersPresent();
548     }
549 
550     // from org.andromda.metafacades.uml.ModelElementFacade
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     // from org.andromda.metafacades.uml.ModelElementFacade
557     public java.lang.String[] translateConstraints(java.lang.String translation)
558     {
559         return this.getSuperEntityAttribute().translateConstraints(translation);
560     }
561 
562     // from org.andromda.metafacades.uml.ModelElementFacade
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             // - just ignore when the metafacade doesn't have a name property
621         }
622         toString.append("]");
623         return toString.toString();
624     }
625 }