View Javadoc
1   // license-header java merge-point
2   //
3   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4   //
5   package org.andromda.metafacades.emf.uml22;
6   
7   import java.util.Collection;
8   import org.andromda.core.metafacade.MetafacadeBase;
9   import org.andromda.core.metafacade.ModelValidationMessage;
10  import org.andromda.metafacades.uml.AssociationEndFacade;
11  import org.andromda.metafacades.uml.AssociationFacade;
12  import org.andromda.metafacades.uml.ClassifierFacade;
13  import org.andromda.translation.ocl.validation.OCLCollections;
14  import org.andromda.translation.ocl.validation.OCLIntrospector;
15  import org.andromda.translation.ocl.validation.OCLResultEnsurer;
16  import org.apache.log4j.Logger;
17  
18  /**
19   * A property related by memberEnd or its specializations to an association represents an end of the
20   * association. The type of the property is the type of the end of the association .Property
21   * represents a declared state of one or more instances in terms of a named relationship to a value
22   * or values. When a property is an association end, the value or values are related to the instance
23   * or instances at the other end(s) of the association.
24   * MetafacadeLogic for AssociationEndFacade
25   *
26   * @see AssociationEndFacade
27   */
28  public abstract class AssociationEndFacadeLogic
29      extends ModelElementFacadeLogicImpl
30      implements AssociationEndFacade
31  {
32      /**
33       * The underlying UML object
34       * @see AssociationEnd
35       */
36      protected AssociationEnd metaObject;
37  
38      /** Create Metafacade implementation instance using the MetafacadeFactory from the context
39       * @param metaObjectIn
40       * @param context
41       */
42      protected AssociationEndFacadeLogic(AssociationEnd metaObjectIn, String context)
43      {
44          super(metaObjectIn, getContext(context));
45          this.metaObject = metaObjectIn;
46      }
47  
48      /**
49       * The logger instance.
50       */
51      private static final Logger logger = Logger.getLogger(AssociationEndFacadeLogic.class);
52  
53      /**
54       * Gets the context for this metafacade logic instance.
55       * @param context String. Set to AssociationEndFacade if null
56       * @return context String
57       */
58      private static String getContext(String context)
59      {
60          if (context == null)
61          {
62              context = "org.andromda.metafacades.uml.AssociationEndFacade";
63          }
64          return context;
65      }
66  
67      /** Reset context only for non-root metafacades
68       * @param context
69       */
70      @Override
71      public void resetMetafacadeContext(String context)
72      {
73          if (!this.contextRoot) // reset context only for non-root metafacades
74          {
75              context = getContext(context);  // to have same value as in original constructor call
76              setMetafacadeContext (context);
77          }
78      }
79  
80      /**
81       * @return boolean true always
82       * @see AssociationEndFacade
83       */
84      public boolean isAssociationEndFacadeMetaType()
85      {
86          return true;
87      }
88  
89      // --------------- attributes ---------------------
90  
91     /**
92      * @see AssociationEndFacade#isOne2One()
93      * @return boolean
94      */
95      protected abstract boolean handleIsOne2One();
96  
97      private boolean __one2One1a;
98      private boolean __one2One1aSet = false;
99  
100     /**
101      * True if this association end's and the other end's multiplicities are both one.
102      * @return (boolean)handleIsOne2One()
103      */
104     public final boolean isOne2One()
105     {
106         boolean one2One1a = this.__one2One1a;
107         if (!this.__one2One1aSet)
108         {
109             // one2One has no pre constraints
110             one2One1a = handleIsOne2One();
111             // one2One has no post constraints
112             this.__one2One1a = one2One1a;
113             if (isMetafacadePropertyCachingEnabled())
114             {
115                 this.__one2One1aSet = true;
116             }
117         }
118         return one2One1a;
119     }
120 
121    /**
122     * @see AssociationEndFacade#isOne2Many()
123     * @return boolean
124     */
125     protected abstract boolean handleIsOne2Many();
126 
127     private boolean __one2Many2a;
128     private boolean __one2Many2aSet = false;
129 
130     /**
131      * True if this association end's multiplicity is one while the other end's is many.
132      * @return (boolean)handleIsOne2Many()
133      */
134     public final boolean isOne2Many()
135     {
136         boolean one2Many2a = this.__one2Many2a;
137         if (!this.__one2Many2aSet)
138         {
139             // one2Many has no pre constraints
140             one2Many2a = handleIsOne2Many();
141             // one2Many has no post constraints
142             this.__one2Many2a = one2Many2a;
143             if (isMetafacadePropertyCachingEnabled())
144             {
145                 this.__one2Many2aSet = true;
146             }
147         }
148         return one2Many2a;
149     }
150 
151    /**
152     * @see AssociationEndFacade#isMany2One()
153     * @return boolean
154     */
155     protected abstract boolean handleIsMany2One();
156 
157     private boolean __many2One3a;
158     private boolean __many2One3aSet = false;
159 
160     /**
161      * True if this association end's multiplicity is many while the other end's is one.
162      * @return (boolean)handleIsMany2One()
163      */
164     public final boolean isMany2One()
165     {
166         boolean many2One3a = this.__many2One3a;
167         if (!this.__many2One3aSet)
168         {
169             // many2One has no pre constraints
170             many2One3a = handleIsMany2One();
171             // many2One has no post constraints
172             this.__many2One3a = many2One3a;
173             if (isMetafacadePropertyCachingEnabled())
174             {
175                 this.__many2One3aSet = true;
176             }
177         }
178         return many2One3a;
179     }
180 
181    /**
182     * @see AssociationEndFacade#isMany2Many()
183     * @return boolean
184     */
185     protected abstract boolean handleIsMany2Many();
186 
187     private boolean __many2Many4a;
188     private boolean __many2Many4aSet = false;
189 
190     /**
191      * True if this association end's and the other end's multiplicities are both many.
192      * @return (boolean)handleIsMany2Many()
193      */
194     public final boolean isMany2Many()
195     {
196         boolean many2Many4a = this.__many2Many4a;
197         if (!this.__many2Many4aSet)
198         {
199             // many2Many has no pre constraints
200             many2Many4a = handleIsMany2Many();
201             // many2Many has no post constraints
202             this.__many2Many4a = many2Many4a;
203             if (isMetafacadePropertyCachingEnabled())
204             {
205                 this.__many2Many4aSet = true;
206             }
207         }
208         return many2Many4a;
209     }
210 
211    /**
212     * @see AssociationEndFacade#isAggregation()
213     * @return boolean
214     */
215     protected abstract boolean handleIsAggregation();
216 
217     private boolean __aggregation5a;
218     private boolean __aggregation5aSet = false;
219 
220     /**
221      * True if this association end represents an aggregation relationship.
222      * @return (boolean)handleIsAggregation()
223      */
224     public final boolean isAggregation()
225     {
226         boolean aggregation5a = this.__aggregation5a;
227         if (!this.__aggregation5aSet)
228         {
229             // aggregation has no pre constraints
230             aggregation5a = handleIsAggregation();
231             // aggregation has no post constraints
232             this.__aggregation5a = aggregation5a;
233             if (isMetafacadePropertyCachingEnabled())
234             {
235                 this.__aggregation5aSet = true;
236             }
237         }
238         return aggregation5a;
239     }
240 
241    /**
242     * @see AssociationEndFacade#isComposition()
243     * @return boolean
244     */
245     protected abstract boolean handleIsComposition();
246 
247     private boolean __composition6a;
248     private boolean __composition6aSet = false;
249 
250     /**
251      * True if this association end represents a composition relationship.
252      * @return (boolean)handleIsComposition()
253      */
254     public final boolean isComposition()
255     {
256         boolean composition6a = this.__composition6a;
257         if (!this.__composition6aSet)
258         {
259             // composition has no pre constraints
260             composition6a = handleIsComposition();
261             // composition has no post constraints
262             this.__composition6a = composition6a;
263             if (isMetafacadePropertyCachingEnabled())
264             {
265                 this.__composition6aSet = true;
266             }
267         }
268         return composition6a;
269     }
270 
271    /**
272     * @see AssociationEndFacade#isOrdered()
273     * @return boolean
274     */
275     protected abstract boolean handleIsOrdered();
276 
277     private boolean __ordered7a;
278     private boolean __ordered7aSet = false;
279 
280     /**
281      * Indicates whether or not the association ends are ordered (if multiplicity is greater than
282      * 1).
283      * @return (boolean)handleIsOrdered()
284      */
285     public final boolean isOrdered()
286     {
287         boolean ordered7a = this.__ordered7a;
288         if (!this.__ordered7aSet)
289         {
290             // ordered has no pre constraints
291             ordered7a = handleIsOrdered();
292             // ordered has no post constraints
293             this.__ordered7a = ordered7a;
294             if (isMetafacadePropertyCachingEnabled())
295             {
296                 this.__ordered7aSet = true;
297             }
298         }
299         return ordered7a;
300     }
301 
302    /**
303     * @see AssociationEndFacade#isReadOnly()
304     * @return boolean
305     */
306     protected abstract boolean handleIsReadOnly();
307 
308     private boolean __readOnly8a;
309     private boolean __readOnly8aSet = false;
310 
311     /**
312      * True if the association end cannot be changed.
313      * @return (boolean)handleIsReadOnly()
314      */
315     public final boolean isReadOnly()
316     {
317         boolean readOnly8a = this.__readOnly8a;
318         if (!this.__readOnly8aSet)
319         {
320             // readOnly has no pre constraints
321             readOnly8a = handleIsReadOnly();
322             // readOnly has no post constraints
323             this.__readOnly8a = readOnly8a;
324             if (isMetafacadePropertyCachingEnabled())
325             {
326                 this.__readOnly8aSet = true;
327             }
328         }
329         return readOnly8a;
330     }
331 
332    /**
333     * @see AssociationEndFacade#isNavigable()
334     * @return boolean
335     */
336     protected abstract boolean handleIsNavigable();
337 
338     private boolean __navigable9a;
339     private boolean __navigable9aSet = false;
340 
341     /**
342      * True if it is possible to navigate from the other end to this association end .
343      * @return (boolean)handleIsNavigable()
344      */
345     public final boolean isNavigable()
346     {
347         boolean navigable9a = this.__navigable9a;
348         if (!this.__navigable9aSet)
349         {
350             // navigable has no pre constraints
351             navigable9a = handleIsNavigable();
352             // navigable has no post constraints
353             this.__navigable9a = navigable9a;
354             if (isMetafacadePropertyCachingEnabled())
355             {
356                 this.__navigable9aSet = true;
357             }
358         }
359         return navigable9a;
360     }
361 
362    /**
363     * @see AssociationEndFacade#getGetterName()
364     * @return String
365     */
366     protected abstract String handleGetGetterName();
367 
368     private String __getterName10a;
369     private boolean __getterName10aSet = false;
370 
371     /**
372      * A name suitable for use when accessing this association end in programming code.
373      * @return (String)handleGetGetterName()
374      */
375     public final String getGetterName()
376     {
377         String getterName10a = this.__getterName10a;
378         if (!this.__getterName10aSet)
379         {
380             // getterName has no pre constraints
381             getterName10a = handleGetGetterName();
382             // getterName has no post constraints
383             this.__getterName10a = getterName10a;
384             if (isMetafacadePropertyCachingEnabled())
385             {
386                 this.__getterName10aSet = true;
387             }
388         }
389         return getterName10a;
390     }
391 
392    /**
393     * @see AssociationEndFacade#getSetterName()
394     * @return String
395     */
396     protected abstract String handleGetSetterName();
397 
398     private String __setterName11a;
399     private boolean __setterName11aSet = false;
400 
401     /**
402      * A name suitable for use when accessing this association end in programming code.
403      * @return (String)handleGetSetterName()
404      */
405     public final String getSetterName()
406     {
407         String setterName11a = this.__setterName11a;
408         if (!this.__setterName11aSet)
409         {
410             // setterName has no pre constraints
411             setterName11a = handleGetSetterName();
412             // setterName has no post constraints
413             this.__setterName11a = setterName11a;
414             if (isMetafacadePropertyCachingEnabled())
415             {
416                 this.__setterName11aSet = true;
417             }
418         }
419         return setterName11a;
420     }
421 
422    /**
423     * @see AssociationEndFacade#getGetterSetterTypeName()
424     * @return String
425     */
426     protected abstract String handleGetGetterSetterTypeName();
427 
428     private String __getterSetterTypeName12a;
429     private boolean __getterSetterTypeName12aSet = false;
430 
431     /**
432      * The name of the type that is returned on the accessor and mutator operations,  determined in
433      * part by the multiplicity.
434      * @return (String)handleGetGetterSetterTypeName()
435      */
436     public final String getGetterSetterTypeName()
437     {
438         String getterSetterTypeName12a = this.__getterSetterTypeName12a;
439         if (!this.__getterSetterTypeName12aSet)
440         {
441             // getterSetterTypeName has no pre constraints
442             getterSetterTypeName12a = handleGetGetterSetterTypeName();
443             // getterSetterTypeName has no post constraints
444             this.__getterSetterTypeName12a = getterSetterTypeName12a;
445             if (isMetafacadePropertyCachingEnabled())
446             {
447                 this.__getterSetterTypeName12aSet = true;
448             }
449         }
450         return getterSetterTypeName12a;
451     }
452 
453    /**
454     * @see AssociationEndFacade#isMany()
455     * @return boolean
456     */
457     protected abstract boolean handleIsMany();
458 
459     private boolean __many13a;
460     private boolean __many13aSet = false;
461 
462     /**
463      * True if this association end's multiplicity is greater than one.
464      * @return (boolean)handleIsMany()
465      */
466     public final boolean isMany()
467     {
468         boolean many13a = this.__many13a;
469         if (!this.__many13aSet)
470         {
471             // many has no pre constraints
472             many13a = handleIsMany();
473             // many has no post constraints
474             this.__many13a = many13a;
475             if (isMetafacadePropertyCachingEnabled())
476             {
477                 this.__many13aSet = true;
478             }
479         }
480         return many13a;
481     }
482 
483    /**
484     * @see AssociationEndFacade#isRequired()
485     * @return boolean
486     */
487     protected abstract boolean handleIsRequired();
488 
489     private boolean __required14a;
490     private boolean __required14aSet = false;
491 
492     /**
493      * True if this association end's multiplicity is strictly greater than zero.
494      * @return (boolean)handleIsRequired()
495      */
496     public final boolean isRequired()
497     {
498         boolean required14a = this.__required14a;
499         if (!this.__required14aSet)
500         {
501             // required has no pre constraints
502             required14a = handleIsRequired();
503             // required has no post constraints
504             this.__required14a = required14a;
505             if (isMetafacadePropertyCachingEnabled())
506             {
507                 this.__required14aSet = true;
508             }
509         }
510         return required14a;
511     }
512 
513    /**
514     * @see AssociationEndFacade#isChild()
515     * @return boolean
516     */
517     protected abstract boolean handleIsChild();
518 
519     private boolean __child15a;
520     private boolean __child15aSet = false;
521 
522     /**
523      * Returns whether or not (true/false) this association end is the child end of the assocation
524      * (i.e. the other end's aggregation is composition).
525      * @return (boolean)handleIsChild()
526      */
527     public final boolean isChild()
528     {
529         boolean child15a = this.__child15a;
530         if (!this.__child15aSet)
531         {
532             // child has no pre constraints
533             child15a = handleIsChild();
534             // child has no post constraints
535             this.__child15a = child15a;
536             if (isMetafacadePropertyCachingEnabled())
537             {
538                 this.__child15aSet = true;
539             }
540         }
541         return child15a;
542     }
543 
544    /**
545     * @see AssociationEndFacade#getUpper()
546     * @return int
547     */
548     protected abstract int handleGetUpper();
549 
550     private int __upper16a;
551     private boolean __upper16aSet = false;
552 
553     /**
554      * the upper value for the multiplicity (will be -1 for *)
555      * -only applicable for UML2
556      * @return (int)handleGetUpper()
557      */
558     public final int getUpper()
559     {
560         int upper16a = this.__upper16a;
561         if (!this.__upper16aSet)
562         {
563             // upper has no pre constraints
564             upper16a = handleGetUpper();
565             // upper has no post constraints
566             this.__upper16a = upper16a;
567             if (isMetafacadePropertyCachingEnabled())
568             {
569                 this.__upper16aSet = true;
570             }
571         }
572         return upper16a;
573     }
574 
575    /**
576     * @see AssociationEndFacade#getLower()
577     * @return int
578     */
579     protected abstract int handleGetLower();
580 
581     private int __lower17a;
582     private boolean __lower17aSet = false;
583 
584     /**
585      * the lower value for the multiplicity
586      * -only applicable for UML2
587      * @return (int)handleGetLower()
588      */
589     public final int getLower()
590     {
591         int lower17a = this.__lower17a;
592         if (!this.__lower17aSet)
593         {
594             // lower has no pre constraints
595             lower17a = handleGetLower();
596             // lower has no post constraints
597             this.__lower17a = lower17a;
598             if (isMetafacadePropertyCachingEnabled())
599             {
600                 this.__lower17aSet = true;
601             }
602         }
603         return lower17a;
604     }
605 
606    /**
607     * @see AssociationEndFacade#getDefault()
608     * @return String
609     */
610     protected abstract String handleGetDefault();
611 
612     private String __default18a;
613     private boolean __default18aSet = false;
614 
615     /**
616      * UML2: Returns the value of the 'Default' attribute. Specifies a String that represents a
617      * value to be used when no argument is supplied for the Property. A String that is evaluated to
618      * give a default value for the Property when an object of the owning Classifier is
619      * instantiated.  Can be something like: new ValueObject(values);
620      * @return (String)handleGetDefault()
621      */
622     public final String getDefault()
623     {
624         String default18a = this.__default18a;
625         if (!this.__default18aSet)
626         {
627             // default has no pre constraints
628             default18a = handleGetDefault();
629             // default has no post constraints
630             this.__default18a = default18a;
631             if (isMetafacadePropertyCachingEnabled())
632             {
633                 this.__default18aSet = true;
634             }
635         }
636         return default18a;
637     }
638 
639    /**
640     * @see AssociationEndFacade#getAggregationKind()
641     * @return String
642     */
643     protected abstract String handleGetAggregationKind();
644 
645     private String __aggregationKind19a;
646     private boolean __aggregationKind19aSet = false;
647 
648     /**
649      * Returns the value of the 'Aggregation' attribute (none, shared, composite). The default value
650      * is "none". The literals are from the enumeration org.eclipse.uml2.uml.AggregationKind.
651      * Specifies the kind of aggregation that applies to the Property.
652      * @return (String)handleGetAggregationKind()
653      */
654     public final String getAggregationKind()
655     {
656         String aggregationKind19a = this.__aggregationKind19a;
657         if (!this.__aggregationKind19aSet)
658         {
659             // aggregationKind has no pre constraints
660             aggregationKind19a = handleGetAggregationKind();
661             // aggregationKind has no post constraints
662             this.__aggregationKind19a = aggregationKind19a;
663             if (isMetafacadePropertyCachingEnabled())
664             {
665                 this.__aggregationKind19aSet = true;
666             }
667         }
668         return aggregationKind19a;
669     }
670 
671    /**
672     * @see AssociationEndFacade#isLeaf()
673     * @return boolean
674     */
675     protected abstract boolean handleIsLeaf();
676 
677     private boolean __leaf20a;
678     private boolean __leaf20aSet = false;
679 
680     /**
681      * IsLeaf property in the association end property. If true, attribute is final, cannot be
682      * extended or implemented by a descendant. Default=false.
683      * @return (boolean)handleIsLeaf()
684      */
685     public final boolean isLeaf()
686     {
687         boolean leaf20a = this.__leaf20a;
688         if (!this.__leaf20aSet)
689         {
690             // leaf has no pre constraints
691             leaf20a = handleIsLeaf();
692             // leaf has no post constraints
693             this.__leaf20a = leaf20a;
694             if (isMetafacadePropertyCachingEnabled())
695             {
696                 this.__leaf20aSet = true;
697             }
698         }
699         return leaf20a;
700     }
701 
702    /**
703     * @see AssociationEndFacade#isUnique()
704     * @return boolean
705     */
706     protected abstract boolean handleIsUnique();
707 
708     private boolean __unique21a;
709     private boolean __unique21aSet = false;
710 
711     /**
712      * UML2: If the association attribute is unique within the Collection type. UML14 always returns
713      * false. Unique+Ordered determines the implementation Collection type. Default=false.
714      * @return (boolean)handleIsUnique()
715      */
716     public final boolean isUnique()
717     {
718         boolean unique21a = this.__unique21a;
719         if (!this.__unique21aSet)
720         {
721             // unique has no pre constraints
722             unique21a = handleIsUnique();
723             // unique has no post constraints
724             this.__unique21a = unique21a;
725             if (isMetafacadePropertyCachingEnabled())
726             {
727                 this.__unique21aSet = true;
728             }
729         }
730         return unique21a;
731     }
732 
733    /**
734     * @see AssociationEndFacade#getRemoverName()
735     * @return String
736     */
737     protected abstract String handleGetRemoverName();
738 
739     private String __removerName22a;
740     private boolean __removerName22aSet = false;
741 
742     /**
743      * A name suitable for use when removing element from this association end in programming code.
744      * @return (String)handleGetRemoverName()
745      */
746     public final String getRemoverName()
747     {
748         String removerName22a = this.__removerName22a;
749         if (!this.__removerName22aSet)
750         {
751             // removerName has no pre constraints
752             removerName22a = handleGetRemoverName();
753             // removerName has no post constraints
754             this.__removerName22a = removerName22a;
755             if (isMetafacadePropertyCachingEnabled())
756             {
757                 this.__removerName22aSet = true;
758             }
759         }
760         return removerName22a;
761     }
762 
763    /**
764     * @see AssociationEndFacade#getAdderName()
765     * @return String
766     */
767     protected abstract String handleGetAdderName();
768 
769     private String __adderName23a;
770     private boolean __adderName23aSet = false;
771 
772     /**
773      * A name suitable for use when adding new elements to this association end in programming code.
774      * @return (String)handleGetAdderName()
775      */
776     public final String getAdderName()
777     {
778         String adderName23a = this.__adderName23a;
779         if (!this.__adderName23aSet)
780         {
781             // adderName has no pre constraints
782             adderName23a = handleGetAdderName();
783             // adderName has no post constraints
784             this.__adderName23a = adderName23a;
785             if (isMetafacadePropertyCachingEnabled())
786             {
787                 this.__adderName23aSet = true;
788             }
789         }
790         return adderName23a;
791     }
792 
793    /**
794     * @see AssociationEndFacade#isBidirectional()
795     * @return boolean
796     */
797     protected abstract boolean handleIsBidirectional();
798 
799     private boolean __bidirectional24a;
800     private boolean __bidirectional24aSet = false;
801 
802     /**
803      * Is true if update of one side of the association should also update the other side. false if
804      * not.
805      * @return (boolean)handleIsBidirectional()
806      */
807     public final boolean isBidirectional()
808     {
809         boolean bidirectional24a = this.__bidirectional24a;
810         if (!this.__bidirectional24aSet)
811         {
812             // bidirectional has no pre constraints
813             bidirectional24a = handleIsBidirectional();
814             // bidirectional has no post constraints
815             this.__bidirectional24a = bidirectional24a;
816             if (isMetafacadePropertyCachingEnabled())
817             {
818                 this.__bidirectional24aSet = true;
819             }
820         }
821         return bidirectional24a;
822     }
823 
824    /**
825     * @see AssociationEndFacade#isDerived()
826     * @return boolean
827     */
828     protected abstract boolean handleIsDerived();
829 
830     private boolean __derived25a;
831     private boolean __derived25aSet = false;
832 
833     /**
834      * If the association end is derived (its value is computed). UML2 only. UML14 always returns
835      * false. Default=false.
836      * @return (boolean)handleIsDerived()
837      */
838     public final boolean isDerived()
839     {
840         boolean derived25a = this.__derived25a;
841         if (!this.__derived25aSet)
842         {
843             // derived has no pre constraints
844             derived25a = handleIsDerived();
845             // derived has no post constraints
846             this.__derived25a = derived25a;
847             if (isMetafacadePropertyCachingEnabled())
848             {
849                 this.__derived25aSet = true;
850             }
851         }
852         return derived25a;
853     }
854 
855    /**
856     * @see AssociationEndFacade#isStatic()
857     * @return boolean
858     */
859     protected abstract boolean handleIsStatic();
860 
861     private boolean __static26a;
862     private boolean __static26aSet = false;
863 
864     /**
865      * Indicates if this associationEnd is 'static', meaning it has a classifier scope.
866      * @return (boolean)handleIsStatic()
867      */
868     public final boolean isStatic()
869     {
870         boolean static26a = this.__static26a;
871         if (!this.__static26aSet)
872         {
873             // static has no pre constraints
874             static26a = handleIsStatic();
875             // static has no post constraints
876             this.__static26a = static26a;
877             if (isMetafacadePropertyCachingEnabled())
878             {
879                 this.__static26aSet = true;
880             }
881         }
882         return static26a;
883     }
884 
885     // ------------- associations ------------------
886 
887     /**
888      * Gets the association ends belonging to this association.
889      * @return (AssociationFacade)handleGetAssociation()
890      */
891     public final AssociationFacade getAssociation()
892     {
893         AssociationFacade getAssociation1r = null;
894         // associationEnds has no pre constraints
895         Object result = handleGetAssociation();
896         MetafacadeBase shieldedResult = this.shieldedElement(result);
897         try
898         {
899             getAssociation1r = (AssociationFacade)shieldedResult;
900         }
901         catch (ClassCastException ex)
902         {
903             // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
904             AssociationEndFacadeLogic.logger.warn("incorrect metafacade cast for AssociationEndFacadeLogic.getAssociation AssociationFacade " + result + ": " + shieldedResult);
905         }
906         // associationEnds has no post constraints
907         return getAssociation1r;
908     }
909 
910     /**
911      * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
912      * @return Object
913      */
914     protected abstract Object handleGetAssociation();
915 
916     /**
917      * A property related by memberEnd or its specializations to an association represents an end of
918      * the
919      * association. The type of the property is the type of the end of the association .Property
920      * represents
921      * a declared state of one or more instances in terms of a named relationship to a value or
922      * values.
923      * When a property is an association end, the value or values are related to the instance or
924      * instances
925      * at the other end(s) of the association.
926      * @return (ClassifierFacade)handleGetType()
927      */
928     public final ClassifierFacade getType()
929     {
930         ClassifierFacade getType2r = null;
931         // associationEndFacade has no pre constraints
932         Object result = handleGetType();
933         MetafacadeBase shieldedResult = this.shieldedElement(result);
934         try
935         {
936             getType2r = (ClassifierFacade)shieldedResult;
937         }
938         catch (ClassCastException ex)
939         {
940             // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
941             AssociationEndFacadeLogic.logger.warn("incorrect metafacade cast for AssociationEndFacadeLogic.getType ClassifierFacade " + result + ": " + shieldedResult);
942         }
943         // associationEndFacade has no post constraints
944         return getType2r;
945     }
946 
947     /**
948      * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
949      * @return Object
950      */
951     protected abstract Object handleGetType();
952 
953     /**
954      * A property related by memberEnd or its specializations to an association represents an end of
955      * the
956      * association. The type of the property is the type of the end of the association .Property
957      * represents
958      * a declared state of one or more instances in terms of a named relationship to a value or
959      * values.
960      * When a property is an association end, the value or values are related to the instance or
961      * instances
962      * at the other end(s) of the association.
963      * @return (AssociationEndFacade)handleGetOtherEnd()
964      */
965     public final AssociationEndFacade getOtherEnd()
966     {
967         AssociationEndFacade getOtherEnd3r = null;
968         // associationEndFacade has no pre constraints
969         Object result = handleGetOtherEnd();
970         MetafacadeBase shieldedResult = this.shieldedElement(result);
971         try
972         {
973             getOtherEnd3r = (AssociationEndFacade)shieldedResult;
974         }
975         catch (ClassCastException ex)
976         {
977             // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn
978             AssociationEndFacadeLogic.logger.warn("incorrect metafacade cast for AssociationEndFacadeLogic.getOtherEnd AssociationEndFacade " + result + ": " + shieldedResult);
979         }
980         // associationEndFacade has no post constraints
981         return getOtherEnd3r;
982     }
983 
984     /**
985      * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type
986      * @return Object
987      */
988     protected abstract Object handleGetOtherEnd();
989 
990     /**
991      * <p><b>Constraint:</b> org::andromda::metafacades::uml::AssociationEndFacade::association end needs a type</p>
992      * <p><b>Error:</b> Each association end needs a type, you cannot leave the type unspecified.</p>
993      * <p><b>OCL:</b> context AssociationEndFacade
994 inv: type.name->notEmpty()</p>
995      * @param validationMessages Collection<ModelValidationMessage>
996      * @see ModelElementFacadeLogicImpl#validateInvariants(Collection validationMessages)
997      */
998     @Override
999     public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1000     {
1001         super.validateInvariants(validationMessages);
1002         try
1003         {
1004             final Object contextElement = this.THIS();
1005             boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"type.name")));
1006             if (!constraintValid)
1007             {
1008                 validationMessages.add(
1009                     new ModelValidationMessage(
1010                         (MetafacadeBase)contextElement ,
1011                         "org::andromda::metafacades::uml::AssociationEndFacade::association end needs a type",
1012                         "Each association end needs a type, you cannot leave the type unspecified."));
1013             }
1014         }
1015         catch (Throwable th)
1016         {
1017             Throwable cause = th.getCause();
1018             int depth = 0; // Some throwables have infinite recursion
1019             while (cause != null && depth < 7)
1020             {
1021                 th = cause;
1022                 depth++;
1023             }
1024             logger.error("Error validating constraint 'org::andromda::metafacades::uml::AssociationEndFacade::association end needs a type' ON "
1025                 + this.THIS().toString() + ": " + th.getMessage(), th);
1026         }
1027     }
1028 }