View Javadoc

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