View Javadoc

1   //
2   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
3   //
4   package org.andromda.cartridges.spring.metafacades;
5   
6   /***
7    * MetafacadeLogic for org.andromda.cartridges.spring.metafacades.SpringEntityOperation
8    *
9    * @see org.andromda.cartridges.spring.metafacades.SpringEntityOperation
10   */
11  public abstract class SpringEntityOperationLogic
12      extends org.andromda.core.metafacade.MetafacadeBase
13      implements org.andromda.cartridges.spring.metafacades.SpringEntityOperation
14  {
15  
16      protected Object metaObject;
17  
18      public SpringEntityOperationLogic(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.spring.metafacades.SpringEntityOperation";
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.spring.metafacades.SpringEntityOperation
76       */
77      public boolean isSpringEntityOperationMetaType()
78      {
79          return true;
80      }
81      
82      // --------------- attributes ---------------------
83  
84     /***
85      * @see org.andromda.cartridges.spring.metafacades.SpringEntityOperation#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.cartridges.spring.metafacades.SpringEntityOperation#getImplementationCall()
119     */
120     protected abstract java.lang.String handleGetImplementationCall();
121 
122     private void handleGetImplementationCall2aPreCondition()
123     {
124     }
125 
126     private void handleGetImplementationCall2aPostCondition()
127     {
128     }
129 
130     private java.lang.String __implementationCall2a;
131     private boolean __implementationCall2aSet = false;
132 
133     public final java.lang.String getImplementationCall()
134     {
135         java.lang.String implementationCall2a = this.__implementationCall2a;
136         if (!this.__implementationCall2aSet)
137         {
138             handleGetImplementationCall2aPreCondition();
139             implementationCall2a = handleGetImplementationCall();
140             handleGetImplementationCall2aPostCondition();
141             this.__implementationCall2a = implementationCall2a;
142             if (isMetafacadePropertyCachingEnabled())
143             {
144                 this.__implementationCall2aSet = true;
145             }
146         }
147         return implementationCall2a;
148     }
149 
150    /***
151     * @see org.andromda.cartridges.spring.metafacades.SpringEntityOperation#getImplementationSignature()
152     */
153     protected abstract java.lang.String handleGetImplementationSignature();
154 
155     private void handleGetImplementationSignature3aPreCondition()
156     {
157     }
158 
159     private void handleGetImplementationSignature3aPostCondition()
160     {
161     }
162 
163     private java.lang.String __implementationSignature3a;
164     private boolean __implementationSignature3aSet = false;
165 
166     public final java.lang.String getImplementationSignature()
167     {
168         java.lang.String implementationSignature3a = this.__implementationSignature3a;
169         if (!this.__implementationSignature3aSet)
170         {
171             handleGetImplementationSignature3aPreCondition();
172             implementationSignature3a = handleGetImplementationSignature();
173             handleGetImplementationSignature3aPostCondition();
174             this.__implementationSignature3a = implementationSignature3a;
175             if (isMetafacadePropertyCachingEnabled())
176             {
177                 this.__implementationSignature3aSet = true;
178             }
179         }
180         return implementationSignature3a;
181     }
182 
183     // ------------- associations ------------------
184 
185     /***
186      * @see org.andromda.metafacades.uml.OperationFacade
187      */
188     public boolean isOperationFacadeMetaType()
189     {
190         return true;
191     }
192     
193     /***
194      * @see org.andromda.metafacades.uml.ModelElementFacade
195      */
196     public boolean isModelElementFacadeMetaType()
197     {
198         return true;
199     }
200     
201     // ----------- delegates to org.andromda.metafacades.uml.OperationFacade ------------
202     // from org.andromda.metafacades.uml.ModelElementFacade
203     public void copyTaggedValues(org.andromda.metafacades.uml.ModelElementFacade element)
204     {
205         this.getSuperOperationFacade().copyTaggedValues(element);
206     }
207 
208     // from org.andromda.metafacades.uml.ModelElementFacade
209     public java.lang.Object findTaggedValue(java.lang.String tagName)
210     {
211         return this.getSuperOperationFacade().findTaggedValue(tagName);
212     }
213 
214     // from org.andromda.metafacades.uml.ModelElementFacade
215     public java.util.Collection findTaggedValues(java.lang.String tagName)
216     {
217         return this.getSuperOperationFacade().findTaggedValues(tagName);
218     }
219 
220     // from org.andromda.metafacades.uml.ModelElementFacade
221     public java.util.Collection getConstraints()
222     {
223         return this.getSuperOperationFacade().getConstraints();
224     }
225 
226     // from org.andromda.metafacades.uml.ModelElementFacade
227     public java.util.Collection getConstraints(java.lang.String kind)
228     {
229         return this.getSuperOperationFacade().getConstraints(kind);
230     }
231 
232     // from org.andromda.metafacades.uml.ModelElementFacade
233     public java.lang.String getDocumentation(java.lang.String indent, int lineLength)
234     {
235         return this.getSuperOperationFacade().getDocumentation(indent, lineLength);
236     }
237 
238     // from org.andromda.metafacades.uml.ModelElementFacade
239     public java.lang.String getDocumentation(java.lang.String indent, int lineLength, boolean htmlStyle)
240     {
241         return this.getSuperOperationFacade().getDocumentation(indent, lineLength, htmlStyle);
242     }
243 
244     // from org.andromda.metafacades.uml.ModelElementFacade
245     public java.lang.String getDocumentation(java.lang.String indent)
246     {
247         return this.getSuperOperationFacade().getDocumentation(indent);
248     }
249 
250     // from org.andromda.metafacades.uml.ModelElementFacade
251     public java.lang.String getFullyQualifiedName(boolean modelName)
252     {
253         return this.getSuperOperationFacade().getFullyQualifiedName(modelName);
254     }
255 
256     // from org.andromda.metafacades.uml.ModelElementFacade
257     public java.lang.String getFullyQualifiedName()
258     {
259         return this.getSuperOperationFacade().getFullyQualifiedName();
260     }
261 
262     // from org.andromda.metafacades.uml.ModelElementFacade
263     public java.lang.String getFullyQualifiedNamePath()
264     {
265         return this.getSuperOperationFacade().getFullyQualifiedNamePath();
266     }
267 
268     // from org.andromda.metafacades.uml.ModelElementFacade
269     public java.lang.String getId()
270     {
271         return this.getSuperOperationFacade().getId();
272     }
273 
274     // from org.andromda.metafacades.uml.ModelElementFacade
275     public org.andromda.metafacades.uml.TypeMappings getLanguageMappings()
276     {
277         return this.getSuperOperationFacade().getLanguageMappings();
278     }
279 
280     // from org.andromda.metafacades.uml.ModelElementFacade
281     public org.andromda.metafacades.uml.ModelFacade getModel()
282     {
283         return this.getSuperOperationFacade().getModel();
284     }
285 
286     // from org.andromda.metafacades.uml.ModelElementFacade
287     public java.lang.String getName()
288     {
289         return this.getSuperOperationFacade().getName();
290     }
291 
292     // from org.andromda.metafacades.uml.ModelElementFacade
293     public org.andromda.metafacades.uml.ModelElementFacade getPackage()
294     {
295         return this.getSuperOperationFacade().getPackage();
296     }
297 
298     // from org.andromda.metafacades.uml.ModelElementFacade
299     public java.lang.String getPackageName(boolean modelName)
300     {
301         return this.getSuperOperationFacade().getPackageName(modelName);
302     }
303 
304     // from org.andromda.metafacades.uml.ModelElementFacade
305     public java.lang.String getPackageName()
306     {
307         return this.getSuperOperationFacade().getPackageName();
308     }
309 
310     // from org.andromda.metafacades.uml.ModelElementFacade
311     public java.lang.String getPackagePath()
312     {
313         return this.getSuperOperationFacade().getPackagePath();
314     }
315 
316     // from org.andromda.metafacades.uml.ModelElementFacade
317     public org.andromda.metafacades.uml.PackageFacade getRootPackage()
318     {
319         return this.getSuperOperationFacade().getRootPackage();
320     }
321 
322     // from org.andromda.metafacades.uml.ModelElementFacade
323     public java.util.Collection getSourceDependencies()
324     {
325         return this.getSuperOperationFacade().getSourceDependencies();
326     }
327 
328     // from org.andromda.metafacades.uml.ModelElementFacade
329     public org.andromda.metafacades.uml.StateMachineFacade getStateMachineContext()
330     {
331         return this.getSuperOperationFacade().getStateMachineContext();
332     }
333 
334     // from org.andromda.metafacades.uml.ModelElementFacade
335     public java.util.Collection getStereotypeNames()
336     {
337         return this.getSuperOperationFacade().getStereotypeNames();
338     }
339 
340     // from org.andromda.metafacades.uml.ModelElementFacade
341     public java.util.Collection getStereotypes()
342     {
343         return this.getSuperOperationFacade().getStereotypes();
344     }
345 
346     // from org.andromda.metafacades.uml.ModelElementFacade
347     public java.util.Collection getTaggedValues()
348     {
349         return this.getSuperOperationFacade().getTaggedValues();
350     }
351 
352     // from org.andromda.metafacades.uml.ModelElementFacade
353     public java.util.Collection getTargetDependencies()
354     {
355         return this.getSuperOperationFacade().getTargetDependencies();
356     }
357 
358     // from org.andromda.metafacades.uml.ModelElementFacade
359     public java.lang.Object getTemplateParameter(java.lang.String parameterName)
360     {
361         return this.getSuperOperationFacade().getTemplateParameter(parameterName);
362     }
363 
364     // from org.andromda.metafacades.uml.ModelElementFacade
365     public java.util.Collection getTemplateParameters()
366     {
367         return this.getSuperOperationFacade().getTemplateParameters();
368     }
369 
370     // from org.andromda.metafacades.uml.ModelElementFacade
371     public java.lang.String getVisibility()
372     {
373         return this.getSuperOperationFacade().getVisibility();
374     }
375 
376     // from org.andromda.metafacades.uml.ModelElementFacade
377     public boolean hasExactStereotype(java.lang.String stereotypeName)
378     {
379         return this.getSuperOperationFacade().hasExactStereotype(stereotypeName);
380     }
381 
382     // from org.andromda.metafacades.uml.ModelElementFacade
383     public boolean hasStereotype(java.lang.String stereotypeName)
384     {
385         return this.getSuperOperationFacade().hasStereotype(stereotypeName);
386     }
387 
388     // from org.andromda.metafacades.uml.ModelElementFacade
389     public boolean isBindingDependenciesPresent()
390     {
391         return this.getSuperOperationFacade().isBindingDependenciesPresent();
392     }
393 
394     // from org.andromda.metafacades.uml.ModelElementFacade
395     public boolean isConstraintsPresent()
396     {
397         return this.getSuperOperationFacade().isConstraintsPresent();
398     }
399 
400     // from org.andromda.metafacades.uml.ModelElementFacade
401     public boolean isTemplateParametersPresent()
402     {
403         return this.getSuperOperationFacade().isTemplateParametersPresent();
404     }
405 
406     // from org.andromda.metafacades.uml.ModelElementFacade
407     public java.lang.String translateConstraint(java.lang.String name, java.lang.String translation)
408     {
409         return this.getSuperOperationFacade().translateConstraint(name, translation);
410     }
411 
412     // from org.andromda.metafacades.uml.ModelElementFacade
413     public java.lang.String[] translateConstraints(java.lang.String translation)
414     {
415         return this.getSuperOperationFacade().translateConstraints(translation);
416     }
417 
418     // from org.andromda.metafacades.uml.ModelElementFacade
419     public java.lang.String[] translateConstraints(java.lang.String kind, java.lang.String translation)
420     {
421         return this.getSuperOperationFacade().translateConstraints(kind, translation);
422     }
423 
424     // from org.andromda.metafacades.uml.OperationFacade
425     public org.andromda.metafacades.uml.ParameterFacade findParameter(java.lang.String name)
426     {
427         return this.getSuperOperationFacade().findParameter(name);
428     }
429 
430     // from org.andromda.metafacades.uml.OperationFacade
431     public java.lang.Object findTaggedValue(java.lang.String name, boolean follow)
432     {
433         return this.getSuperOperationFacade().findTaggedValue(name, follow);
434     }
435 
436     // from org.andromda.metafacades.uml.OperationFacade
437     public java.lang.String getArgumentNames()
438     {
439         return this.getSuperOperationFacade().getArgumentNames();
440     }
441 
442     // from org.andromda.metafacades.uml.OperationFacade
443     public java.lang.String getArgumentTypeNames()
444     {
445         return this.getSuperOperationFacade().getArgumentTypeNames();
446     }
447 
448     // from org.andromda.metafacades.uml.OperationFacade
449     public java.util.Collection getArguments()
450     {
451         return this.getSuperOperationFacade().getArguments();
452     }
453 
454     // from org.andromda.metafacades.uml.OperationFacade
455     public java.lang.String getCall()
456     {
457         return this.getSuperOperationFacade().getCall();
458     }
459 
460     // from org.andromda.metafacades.uml.OperationFacade
461     public java.lang.String getConcurrency()
462     {
463         return this.getSuperOperationFacade().getConcurrency();
464     }
465 
466     // from org.andromda.metafacades.uml.OperationFacade
467     public java.lang.String getExceptionList(java.lang.String initialExceptions)
468     {
469         return this.getSuperOperationFacade().getExceptionList(initialExceptions);
470     }
471 
472     // from org.andromda.metafacades.uml.OperationFacade
473     public java.lang.String getExceptionList()
474     {
475         return this.getSuperOperationFacade().getExceptionList();
476     }
477 
478     // from org.andromda.metafacades.uml.OperationFacade
479     public java.util.Collection getExceptions()
480     {
481         return this.getSuperOperationFacade().getExceptions();
482     }
483 
484     // from org.andromda.metafacades.uml.OperationFacade
485     public int getLower()
486     {
487         return this.getSuperOperationFacade().getLower();
488     }
489 
490     // from org.andromda.metafacades.uml.OperationFacade
491     public org.andromda.metafacades.uml.OperationFacade getOverriddenOperation()
492     {
493         return this.getSuperOperationFacade().getOverriddenOperation();
494     }
495 
496     // from org.andromda.metafacades.uml.OperationFacade
497     public org.andromda.metafacades.uml.ClassifierFacade getOwner()
498     {
499         return this.getSuperOperationFacade().getOwner();
500     }
501 
502     // from org.andromda.metafacades.uml.OperationFacade
503     public java.util.Collection getParameters()
504     {
505         return this.getSuperOperationFacade().getParameters();
506     }
507 
508     // from org.andromda.metafacades.uml.OperationFacade
509     public java.lang.String getPostconditionName()
510     {
511         return this.getSuperOperationFacade().getPostconditionName();
512     }
513 
514     // from org.andromda.metafacades.uml.OperationFacade
515     public java.util.Collection getPostconditions()
516     {
517         return this.getSuperOperationFacade().getPostconditions();
518     }
519 
520     // from org.andromda.metafacades.uml.OperationFacade
521     public java.lang.String getPreconditionCall()
522     {
523         return this.getSuperOperationFacade().getPreconditionCall();
524     }
525 
526     // from org.andromda.metafacades.uml.OperationFacade
527     public java.lang.String getPreconditionName()
528     {
529         return this.getSuperOperationFacade().getPreconditionName();
530     }
531 
532     // from org.andromda.metafacades.uml.OperationFacade
533     public java.lang.String getPreconditionSignature()
534     {
535         return this.getSuperOperationFacade().getPreconditionSignature();
536     }
537 
538     // from org.andromda.metafacades.uml.OperationFacade
539     public java.util.Collection getPreconditions()
540     {
541         return this.getSuperOperationFacade().getPreconditions();
542     }
543 
544     // from org.andromda.metafacades.uml.OperationFacade
545     public org.andromda.metafacades.uml.ParameterFacade getReturnParameter()
546     {
547         return this.getSuperOperationFacade().getReturnParameter();
548     }
549 
550     // from org.andromda.metafacades.uml.OperationFacade
551     public org.andromda.metafacades.uml.ClassifierFacade getReturnType()
552     {
553         return this.getSuperOperationFacade().getReturnType();
554     }
555 
556     // from org.andromda.metafacades.uml.OperationFacade
557     public java.lang.String getSignature(boolean withArgumentNames)
558     {
559         return this.getSuperOperationFacade().getSignature(withArgumentNames);
560     }
561 
562     // from org.andromda.metafacades.uml.OperationFacade
563     public java.lang.String getSignature()
564     {
565         return this.getSuperOperationFacade().getSignature();
566     }
567 
568     // from org.andromda.metafacades.uml.OperationFacade
569     public java.lang.String getSignature(java.lang.String argumentModifier)
570     {
571         return this.getSuperOperationFacade().getSignature(argumentModifier);
572     }
573 
574     // from org.andromda.metafacades.uml.OperationFacade
575     public java.lang.String getTypedArgumentList(java.lang.String modifier)
576     {
577         return this.getSuperOperationFacade().getTypedArgumentList(modifier);
578     }
579 
580     // from org.andromda.metafacades.uml.OperationFacade
581     public java.lang.String getTypedArgumentList()
582     {
583         return this.getSuperOperationFacade().getTypedArgumentList();
584     }
585 
586     // from org.andromda.metafacades.uml.OperationFacade
587     public int getUpper()
588     {
589         return this.getSuperOperationFacade().getUpper();
590     }
591 
592     // from org.andromda.metafacades.uml.OperationFacade
593     public boolean isAbstract()
594     {
595         return this.getSuperOperationFacade().isAbstract();
596     }
597 
598     // from org.andromda.metafacades.uml.OperationFacade
599     public boolean isExceptionsPresent()
600     {
601         return this.getSuperOperationFacade().isExceptionsPresent();
602     }
603 
604     // from org.andromda.metafacades.uml.OperationFacade
605     public boolean isOverriding()
606     {
607         return this.getSuperOperationFacade().isOverriding();
608     }
609 
610     // from org.andromda.metafacades.uml.OperationFacade
611     public boolean isPostconditionsPresent()
612     {
613         return this.getSuperOperationFacade().isPostconditionsPresent();
614     }
615 
616     // from org.andromda.metafacades.uml.OperationFacade
617     public boolean isPreconditionsPresent()
618     {
619         return this.getSuperOperationFacade().isPreconditionsPresent();
620     }
621 
622     // from org.andromda.metafacades.uml.OperationFacade
623     public boolean isQuery()
624     {
625         return this.getSuperOperationFacade().isQuery();
626     }
627 
628     // from org.andromda.metafacades.uml.OperationFacade
629     public boolean isReturnTypePresent()
630     {
631         return this.getSuperOperationFacade().isReturnTypePresent();
632     }
633 
634     // from org.andromda.metafacades.uml.OperationFacade
635     public boolean isStatic()
636     {
637         return this.getSuperOperationFacade().isStatic();
638     }
639 
640     /***
641      * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
642      */
643     public void initialize()
644     {
645         this.getSuperOperationFacade().initialize();
646     }
647 
648     /***
649      * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
650      */
651     public Object getValidationOwner()
652     {
653         Object owner = this.getSuperOperationFacade().getValidationOwner();
654         return owner;
655     }
656 
657     /***
658      * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
659      */
660     public String getValidationName()
661     {
662         String name = this.getSuperOperationFacade().getValidationName();
663         return name;
664     }
665 
666     /***
667      * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
668      */
669     public void validateInvariants(java.util.Collection validationMessages)
670     {
671         this.getSuperOperationFacade().validateInvariants(validationMessages);
672     }
673     
674     /***
675      * The property that stores the name of the metafacade.
676      */
677     private static final String NAME_PROPERTY = "name";
678     
679     /***
680      * @see java.lang.Object#toString()
681      */
682     public String toString()
683     {
684         final StringBuffer toString = new StringBuffer(this.getClass().getName());
685         toString.append("[");
686         try
687         {
688             toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
689         }
690         catch (final Throwable throwable)
691         {
692             // - just ignore when the metafacade doesn't have a name property
693         }
694         toString.append("]");
695         return toString.toString();
696     }
697 }