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