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