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.EJBAssociationFacade
8    *
9    * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade
10   */
11  public abstract class EJBAssociationFacadeLogic
12      extends org.andromda.core.metafacade.MetafacadeBase
13      implements org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade
14  {
15  
16      protected Object metaObject;
17  
18      public EJBAssociationFacadeLogic(Object metaObject, String context)
19      {
20          super(metaObject, getContext(context));
21          this.superEntityAssociation =
22             (org.andromda.metafacades.uml.EntityAssociation)
23              org.andromda.core.metafacade.MetafacadeFactory.getInstance().createFacadeImpl(
24                      "org.andromda.metafacades.uml.EntityAssociation",
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.EJBAssociationFacade";
38          }
39          return context;
40      }
41  
42      private org.andromda.metafacades.uml.EntityAssociation superEntityAssociation;
43      private boolean superEntityAssociationInitialized = false;
44  
45      /***
46       * Gets the org.andromda.metafacades.uml.EntityAssociation parent instance.
47       */
48      private org.andromda.metafacades.uml.EntityAssociation getSuperEntityAssociation()
49      {
50          if (!this.superEntityAssociationInitialized)
51          {
52              ((org.andromda.core.metafacade.MetafacadeBase)superEntityAssociation).setMetafacadeContext(this.getMetafacadeContext());
53              this.superEntityAssociationInitialized = true;
54          }
55          return superEntityAssociation;
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.superEntityAssociationInitialized)
68              {
69                  ((org.andromda.core.metafacade.MetafacadeBase)superEntityAssociation).resetMetafacadeContext(context);
70              }
71          }
72      }
73  
74      /***
75       * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade
76       */
77      public boolean isEJBAssociationFacadeMetaType()
78      {
79          return true;
80      }
81      
82      // --------------- attributes ---------------------
83  
84     /***
85      * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade#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.EntityAssociation
119      */
120     public boolean isEntityAssociationMetaType()
121     {
122         return true;
123     }
124     
125     /***
126      * @see org.andromda.metafacades.uml.AssociationFacade
127      */
128     public boolean isAssociationFacadeMetaType()
129     {
130         return true;
131     }
132     
133     /***
134      * @see org.andromda.metafacades.uml.GeneralizableElementFacade
135      */
136     public boolean isGeneralizableElementFacadeMetaType()
137     {
138         return true;
139     }
140     
141     /***
142      * @see org.andromda.metafacades.uml.ModelElementFacade
143      */
144     public boolean isModelElementFacadeMetaType()
145     {
146         return true;
147     }
148     
149     // ----------- delegates to org.andromda.metafacades.uml.EntityAssociation ------------
150     // from org.andromda.metafacades.uml.AssociationFacade
151     public org.andromda.metafacades.uml.AssociationEndFacade getAssociationEndA()
152     {
153         return this.getSuperEntityAssociation().getAssociationEndA();
154     }
155 
156     // from org.andromda.metafacades.uml.AssociationFacade
157     public org.andromda.metafacades.uml.AssociationEndFacade getAssociationEndB()
158     {
159         return this.getSuperEntityAssociation().getAssociationEndB();
160     }
161 
162     // from org.andromda.metafacades.uml.AssociationFacade
163     public java.util.List getAssociationEnds()
164     {
165         return this.getSuperEntityAssociation().getAssociationEnds();
166     }
167 
168     // from org.andromda.metafacades.uml.AssociationFacade
169     public java.lang.String getRelationName()
170     {
171         return this.getSuperEntityAssociation().getRelationName();
172     }
173 
174     // from org.andromda.metafacades.uml.AssociationFacade
175     public boolean isAbstract()
176     {
177         return this.getSuperEntityAssociation().isAbstract();
178     }
179 
180     // from org.andromda.metafacades.uml.AssociationFacade
181     public boolean isAssociationClass()
182     {
183         return this.getSuperEntityAssociation().isAssociationClass();
184     }
185 
186     // from org.andromda.metafacades.uml.AssociationFacade
187     public boolean isLeaf()
188     {
189         return this.getSuperEntityAssociation().isLeaf();
190     }
191 
192     // from org.andromda.metafacades.uml.AssociationFacade
193     public boolean isMany2Many()
194     {
195         return this.getSuperEntityAssociation().isMany2Many();
196     }
197 
198     // from org.andromda.metafacades.uml.EntityAssociation
199     public java.lang.String getSchema()
200     {
201         return this.getSuperEntityAssociation().getSchema();
202     }
203 
204     // from org.andromda.metafacades.uml.EntityAssociation
205     public java.lang.String getTableName()
206     {
207         return this.getSuperEntityAssociation().getTableName();
208     }
209 
210     // from org.andromda.metafacades.uml.EntityAssociation
211     public boolean isEntityAssociation()
212     {
213         return this.getSuperEntityAssociation().isEntityAssociation();
214     }
215 
216     // from org.andromda.metafacades.uml.GeneralizableElementFacade
217     public java.lang.Object findTaggedValue(java.lang.String tagName, boolean follow)
218     {
219         return this.getSuperEntityAssociation().findTaggedValue(tagName, follow);
220     }
221 
222     // from org.andromda.metafacades.uml.GeneralizableElementFacade
223     public java.util.Collection getAllGeneralizations()
224     {
225         return this.getSuperEntityAssociation().getAllGeneralizations();
226     }
227 
228     // from org.andromda.metafacades.uml.GeneralizableElementFacade
229     public java.util.Collection getAllSpecializations()
230     {
231         return this.getSuperEntityAssociation().getAllSpecializations();
232     }
233 
234     // from org.andromda.metafacades.uml.GeneralizableElementFacade
235     public org.andromda.metafacades.uml.GeneralizableElementFacade getGeneralization()
236     {
237         return this.getSuperEntityAssociation().getGeneralization();
238     }
239 
240     // from org.andromda.metafacades.uml.GeneralizableElementFacade
241     public java.util.Collection getGeneralizationLinks()
242     {
243         return this.getSuperEntityAssociation().getGeneralizationLinks();
244     }
245 
246     // from org.andromda.metafacades.uml.GeneralizableElementFacade
247     public java.lang.String getGeneralizationList()
248     {
249         return this.getSuperEntityAssociation().getGeneralizationList();
250     }
251 
252     // from org.andromda.metafacades.uml.GeneralizableElementFacade
253     public org.andromda.metafacades.uml.GeneralizableElementFacade getGeneralizationRoot()
254     {
255         return this.getSuperEntityAssociation().getGeneralizationRoot();
256     }
257 
258     // from org.andromda.metafacades.uml.GeneralizableElementFacade
259     public java.util.Collection getGeneralizations()
260     {
261         return this.getSuperEntityAssociation().getGeneralizations();
262     }
263 
264     // from org.andromda.metafacades.uml.GeneralizableElementFacade
265     public java.util.Collection getSpecializations()
266     {
267         return this.getSuperEntityAssociation().getSpecializations();
268     }
269 
270     // from org.andromda.metafacades.uml.ModelElementFacade
271     public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
272     {
273         this.getSuperEntityAssociation().copyTaggedValues(element);
274     }
275 
276     // from org.andromda.metafacades.uml.ModelElementFacade
277     public java.lang.Object findTaggedValue(java.lang.String tagName)
278     {
279         return this.getSuperEntityAssociation().findTaggedValue(tagName);
280     }
281 
282     // from org.andromda.metafacades.uml.ModelElementFacade
283     public java.util.Collection findTaggedValues(java.lang.String tagName)
284     {
285         return this.getSuperEntityAssociation().findTaggedValues(tagName);
286     }
287 
288     // from org.andromda.metafacades.uml.ModelElementFacade
289     public java.util.Collection getConstraints()
290     {
291         return this.getSuperEntityAssociation().getConstraints();
292     }
293 
294     // from org.andromda.metafacades.uml.ModelElementFacade
295     public java.util.Collection getConstraints(java.lang.String kind)
296     {
297         return this.getSuperEntityAssociation().getConstraints(kind);
298     }
299 
300     // from org.andromda.metafacades.uml.ModelElementFacade
301     public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
302     {
303         return this.getSuperEntityAssociation().getDocumentation(indent, lineLength);
304     }
305 
306     // from org.andromda.metafacades.uml.ModelElementFacade
307     public java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
308     {
309         return this.getSuperEntityAssociation().getDocumentation(indent, lineLength, htmlStyle);
310     }
311 
312     // from org.andromda.metafacades.uml.ModelElementFacade
313     public java.lang.String getDocumentation(java.lang.String indent)
314     {
315         return this.getSuperEntityAssociation().getDocumentation(indent);
316     }
317 
318     // from org.andromda.metafacades.uml.ModelElementFacade
319     public java.lang.String getFullyQualifiedName(boolean modelName)
320     {
321         return this.getSuperEntityAssociation().getFullyQualifiedName(modelName);
322     }
323 
324     // from org.andromda.metafacades.uml.ModelElementFacade
325     public java.lang.String getFullyQualifiedName()
326     {
327         return this.getSuperEntityAssociation().getFullyQualifiedName();
328     }
329 
330     // from org.andromda.metafacades.uml.ModelElementFacade
331     public java.lang.String getFullyQualifiedNamePath()
332     {
333         return this.getSuperEntityAssociation().getFullyQualifiedNamePath();
334     }
335 
336     // from org.andromda.metafacades.uml.ModelElementFacade
337     public java.lang.String getId()
338     {
339         return this.getSuperEntityAssociation().getId();
340     }
341 
342     // from org.andromda.metafacades.uml.ModelElementFacade
343     public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
344     {
345         return this.getSuperEntityAssociation().getLanguageMappings();
346     }
347 
348     // from org.andromda.metafacades.uml.ModelElementFacade
349     public org.andromda.metafacades.uml.ModelFacade getModel()
350     {
351         return this.getSuperEntityAssociation().getModel();
352     }
353 
354     // from org.andromda.metafacades.uml.ModelElementFacade
355     public java.lang.String getName()
356     {
357         return this.getSuperEntityAssociation().getName();
358     }
359 
360     // from org.andromda.metafacades.uml.ModelElementFacade
361     public org.andromda.metafacades.uml.ModelElementFacade getPackage()
362     {
363         return this.getSuperEntityAssociation().getPackage();
364     }
365 
366     // from org.andromda.metafacades.uml.ModelElementFacade
367     public java.lang.String getPackageName(boolean modelName)
368     {
369         return this.getSuperEntityAssociation().getPackageName(modelName);
370     }
371 
372     // from org.andromda.metafacades.uml.ModelElementFacade
373     public java.lang.String getPackageName()
374     {
375         return this.getSuperEntityAssociation().getPackageName();
376     }
377 
378     // from org.andromda.metafacades.uml.ModelElementFacade
379     public java.lang.String getPackagePath()
380     {
381         return this.getSuperEntityAssociation().getPackagePath();
382     }
383 
384     // from org.andromda.metafacades.uml.ModelElementFacade
385     public org.andromda.metafacades.uml.PackageFacade getRootPackage()
386     {
387         return this.getSuperEntityAssociation().getRootPackage();
388     }
389 
390     // from org.andromda.metafacades.uml.ModelElementFacade
391     public java.util.Collection getSourceDependencies()
392     {
393         return this.getSuperEntityAssociation().getSourceDependencies();
394     }
395 
396     // from org.andromda.metafacades.uml.ModelElementFacade
397     public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
398     {
399         return this.getSuperEntityAssociation().getStateMachineContext();
400     }
401 
402     // from org.andromda.metafacades.uml.ModelElementFacade
403     public java.util.Collection getStereotypeNames()
404     {
405         return this.getSuperEntityAssociation().getStereotypeNames();
406     }
407 
408     // from org.andromda.metafacades.uml.ModelElementFacade
409     public java.util.Collection getStereotypes()
410     {
411         return this.getSuperEntityAssociation().getStereotypes();
412     }
413 
414     // from org.andromda.metafacades.uml.ModelElementFacade
415     public java.util.Collection getTaggedValues()
416     {
417         return this.getSuperEntityAssociation().getTaggedValues();
418     }
419 
420     // from org.andromda.metafacades.uml.ModelElementFacade
421     public java.util.Collection getTargetDependencies()
422     {
423         return this.getSuperEntityAssociation().getTargetDependencies();
424     }
425 
426     // from org.andromda.metafacades.uml.ModelElementFacade
427     public java.lang.Object getTemplateParameter(java.lang.String parameterName)
428     {
429         return this.getSuperEntityAssociation().getTemplateParameter(parameterName);
430     }
431 
432     // from org.andromda.metafacades.uml.ModelElementFacade
433     public java.util.Collection getTemplateParameters()
434     {
435         return this.getSuperEntityAssociation().getTemplateParameters();
436     }
437 
438     // from org.andromda.metafacades.uml.ModelElementFacade
439     public java.lang.String getVisibility()
440     {
441         return this.getSuperEntityAssociation().getVisibility();
442     }
443 
444     // from org.andromda.metafacades.uml.ModelElementFacade
445     public boolean hasExactStereotype(java.lang.String stereotypeName)
446     {
447         return this.getSuperEntityAssociation().hasExactStereotype(stereotypeName);
448     }
449 
450     // from org.andromda.metafacades.uml.ModelElementFacade
451     public boolean hasStereotype(java.lang.String stereotypeName)
452     {
453         return this.getSuperEntityAssociation().hasStereotype(stereotypeName);
454     }
455 
456     // from org.andromda.metafacades.uml.ModelElementFacade
457     public boolean isBindingDependenciesPresent()
458     {
459         return this.getSuperEntityAssociation().isBindingDependenciesPresent();
460     }
461 
462     // from org.andromda.metafacades.uml.ModelElementFacade
463     public boolean isConstraintsPresent()
464     {
465         return this.getSuperEntityAssociation().isConstraintsPresent();
466     }
467 
468     // from org.andromda.metafacades.uml.ModelElementFacade
469     public boolean isTemplateParametersPresent()
470     {
471         return this.getSuperEntityAssociation().isTemplateParametersPresent();
472     }
473 
474     // from org.andromda.metafacades.uml.ModelElementFacade
475     public java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
476     {
477         return this.getSuperEntityAssociation().translateConstraint(name, translation);
478     }
479 
480     // from org.andromda.metafacades.uml.ModelElementFacade
481     public java.lang.String[] translateConstraints(java.lang.String translation)
482     {
483         return this.getSuperEntityAssociation().translateConstraints(translation);
484     }
485 
486     // from org.andromda.metafacades.uml.ModelElementFacade
487     public java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
488     {
489         return this.getSuperEntityAssociation().translateConstraints(kind, translation);
490     }
491 
492     /***
493      * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
494      */
495     public void initialize()
496     {
497         this.getSuperEntityAssociation().initialize();
498     }
499 
500     /***
501      * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
502      */
503     public Object getValidationOwner()
504     {
505         Object owner = this.getSuperEntityAssociation().getValidationOwner();
506         return owner;
507     }
508 
509     /***
510      * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
511      */
512     public String getValidationName()
513     {
514         String name = this.getSuperEntityAssociation().getValidationName();
515         return name;
516     }
517 
518     /***
519      * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
520      */
521     public void validateInvariants(java.util.Collection validationMessages)
522     {
523         this.getSuperEntityAssociation().validateInvariants(validationMessages);
524     }
525     
526     /***
527      * The property that stores the name of the metafacade.
528      */
529     private static final String NAME_PROPERTY = "name";
530     
531     /***
532      * @see java.lang.Object#toString()
533      */
534     public String toString()
535     {
536         final StringBuffer toString = new StringBuffer(this.getClass().getName());
537         toString.append("[");
538         try
539         {
540             toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
541         }
542         catch (final Throwable throwable)
543         {
544             // - just ignore when the metafacade doesn't have a name property
545         }
546         toString.append("]");
547         return toString.toString();
548     }
549 }