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