001// license-header java merge-point
002//
003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
004//
005package org.andromda.cartridges.hibernate.metafacades;
006
007import java.util.Collection;
008import org.andromda.core.common.Introspector;
009import org.andromda.core.metafacade.MetafacadeBase;
010import org.andromda.core.metafacade.MetafacadeFactory;
011import org.andromda.core.metafacade.ModelValidationMessage;
012import org.andromda.metafacades.uml.AssociationEndFacade;
013import org.andromda.metafacades.uml.AssociationFacade;
014import org.andromda.metafacades.uml.ClassifierFacade;
015import org.andromda.metafacades.uml.ConstraintFacade;
016import org.andromda.metafacades.uml.DependencyFacade;
017import org.andromda.metafacades.uml.EntityAssociationEnd;
018import org.andromda.metafacades.uml.ModelElementFacade;
019import org.andromda.metafacades.uml.ModelFacade;
020import org.andromda.metafacades.uml.PackageFacade;
021import org.andromda.metafacades.uml.StateMachineFacade;
022import org.andromda.metafacades.uml.StereotypeFacade;
023import org.andromda.metafacades.uml.TaggedValueFacade;
024import org.andromda.metafacades.uml.TemplateParameterFacade;
025import org.andromda.metafacades.uml.TypeMappings;
026import org.andromda.translation.ocl.validation.OCLCollections;
027import org.andromda.translation.ocl.validation.OCLIntrospector;
028import org.andromda.translation.ocl.validation.OCLResultEnsurer;
029import org.apache.log4j.Logger;
030
031/**
032 * Represents an association end between Hibernate entities.
033 * MetafacadeLogic for HibernateAssociationEnd
034 *
035 * @see HibernateAssociationEnd
036 */
037public abstract class HibernateAssociationEndLogic
038    extends MetafacadeBase
039    implements HibernateAssociationEnd
040{
041    /**
042     * The underlying UML object
043     * @see Object
044     */
045    protected Object metaObject;
046
047    /** Create Metafacade implementation instance using the MetafacadeFactory from the context
048     * @param metaObjectIn
049     * @param context
050     */
051    protected HibernateAssociationEndLogic(Object metaObjectIn, String context)
052    {
053        super(metaObjectIn, getContext(context));
054        this.superEntityAssociationEnd =
055           (EntityAssociationEnd)
056            MetafacadeFactory.getInstance().createFacadeImpl(
057                    "org.andromda.metafacades.uml.EntityAssociationEnd",
058                    metaObjectIn,
059                    getContext(context));
060        this.metaObject = metaObjectIn;
061    }
062
063    /**
064     * The logger instance.
065     */
066    private static final Logger logger = Logger.getLogger(HibernateAssociationEndLogic.class);
067
068    /**
069     * Gets the context for this metafacade logic instance.
070     * @param context String. Set to HibernateAssociationEnd if null
071     * @return context String
072     */
073    private static String getContext(String context)
074    {
075        if (context == null)
076        {
077            context = "org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd";
078        }
079        return context;
080    }
081
082    private EntityAssociationEnd superEntityAssociationEnd;
083    private boolean superEntityAssociationEndInitialized = false;
084
085    /**
086     * Gets the EntityAssociationEnd parent instance.
087     * @return this.superEntityAssociationEnd EntityAssociationEnd
088     */
089    private EntityAssociationEnd getSuperEntityAssociationEnd()
090    {
091        if (!this.superEntityAssociationEndInitialized)
092        {
093            ((MetafacadeBase)this.superEntityAssociationEnd).setMetafacadeContext(this.getMetafacadeContext());
094            this.superEntityAssociationEndInitialized = true;
095        }
096        return this.superEntityAssociationEnd;
097    }
098
099    /** Reset context only for non-root metafacades
100     * @param context
101     * @see MetafacadeBase#resetMetafacadeContext(String context)
102     */
103    @Override
104    public void resetMetafacadeContext(String context)
105    {
106        if (!this.contextRoot) // reset context only for non-root metafacades
107        {
108            context = getContext(context);  // to have same value as in original constructor call
109            setMetafacadeContext (context);
110            if (this.superEntityAssociationEndInitialized)
111            {
112                ((MetafacadeBase)this.superEntityAssociationEnd).resetMetafacadeContext(context);
113            }
114        }
115    }
116
117    /**
118     * @return boolean true always
119     * @see HibernateAssociationEnd
120     */
121    public boolean isHibernateAssociationEndMetaType()
122    {
123        return true;
124    }
125
126    // --------------- attributes ---------------------
127
128   /**
129    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isLazy()
130    * @return boolean
131    */
132    protected abstract boolean handleIsLazy();
133
134    private boolean __lazy1a;
135    private boolean __lazy1aSet = false;
136
137    /**
138     * TODO: Model Documentation for
139     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.lazy
140     * @return (boolean)handleIsLazy()
141     */
142    public final boolean isLazy()
143    {
144        boolean lazy1a = this.__lazy1a;
145        if (!this.__lazy1aSet)
146        {
147            // lazy has no pre constraints
148            lazy1a = handleIsLazy();
149            // lazy has no post constraints
150            this.__lazy1a = lazy1a;
151            if (isMetafacadePropertyCachingEnabled())
152            {
153                this.__lazy1aSet = true;
154            }
155        }
156        return lazy1a;
157    }
158
159   /**
160    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getOuterJoin()
161    * @return String
162    */
163    protected abstract String handleGetOuterJoin();
164
165    private String __outerJoin2a;
166    private boolean __outerJoin2aSet = false;
167
168    /**
169     * This value will determine how Hibernate manages the asocciation on a many to one and one to
170     * one relation. It will tell hibernate how  to use outerJoins. Values: auto,false,true
171     * @return (String)handleGetOuterJoin()
172     */
173    public final String getOuterJoin()
174    {
175        String outerJoin2a = this.__outerJoin2a;
176        if (!this.__outerJoin2aSet)
177        {
178            // outerJoin has no pre constraints
179            outerJoin2a = handleGetOuterJoin();
180            // outerJoin has no post constraints
181            this.__outerJoin2a = outerJoin2a;
182            if (isMetafacadePropertyCachingEnabled())
183            {
184                this.__outerJoin2aSet = true;
185            }
186        }
187        return outerJoin2a;
188    }
189
190   /**
191    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isHibernateInverse()
192    * @return boolean
193    */
194    protected abstract boolean handleIsHibernateInverse();
195
196    private boolean __hibernateInverse3a;
197    private boolean __hibernateInverse3aSet = false;
198
199    /**
200     * Whether or not the hibernate inverse attribute is true or false.
201     * @return (boolean)handleIsHibernateInverse()
202     */
203    public final boolean isHibernateInverse()
204    {
205        boolean hibernateInverse3a = this.__hibernateInverse3a;
206        if (!this.__hibernateInverse3aSet)
207        {
208            // hibernateInverse has no pre constraints
209            hibernateInverse3a = handleIsHibernateInverse();
210            // hibernateInverse has no post constraints
211            this.__hibernateInverse3a = hibernateInverse3a;
212            if (isMetafacadePropertyCachingEnabled())
213            {
214                this.__hibernateInverse3aSet = true;
215            }
216        }
217        return hibernateInverse3a;
218    }
219
220   /**
221    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getHibernateCascade()
222    * @return String
223    */
224    protected abstract String handleGetHibernateCascade();
225
226    private String __hibernateCascade4a;
227    private boolean __hibernateCascade4aSet = false;
228
229    /**
230     * Stores the hibernate cascade attribute of this association end.
231     * @return (String)handleGetHibernateCascade()
232     */
233    public final String getHibernateCascade()
234    {
235        String hibernateCascade4a = this.__hibernateCascade4a;
236        if (!this.__hibernateCascade4aSet)
237        {
238            // hibernateCascade has no pre constraints
239            hibernateCascade4a = handleGetHibernateCascade();
240            // hibernateCascade has no post constraints
241            this.__hibernateCascade4a = hibernateCascade4a;
242            if (isMetafacadePropertyCachingEnabled())
243            {
244                this.__hibernateCascade4aSet = true;
245            }
246        }
247        return hibernateCascade4a;
248    }
249
250   /**
251    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isOne2OnePrimary()
252    * @return boolean
253    */
254    protected abstract boolean handleIsOne2OnePrimary();
255
256    private boolean __one2OnePrimary5a;
257    private boolean __one2OnePrimary5aSet = false;
258
259    /**
260     * Returns whether or not a one-to-one mapping should be the "primary" mapping for the one2one.
261     * It returns a true if this one2one end is an aggregation or a composite. If using the foriegn
262     * key association approach, this end will get the foreign key column definition. If using the
263     * primary key association approach, this end will get the independent primary key and the other
264     * end will get the dependent primary key (i.e. its primary key will be a foreign key to this
265     * table).
266     * @return (boolean)handleIsOne2OnePrimary()
267     */
268    public final boolean isOne2OnePrimary()
269    {
270        boolean one2OnePrimary5a = this.__one2OnePrimary5a;
271        if (!this.__one2OnePrimary5aSet)
272        {
273            // one2OnePrimary has no pre constraints
274            one2OnePrimary5a = handleIsOne2OnePrimary();
275            // one2OnePrimary has no post constraints
276            this.__one2OnePrimary5a = one2OnePrimary5a;
277            if (isMetafacadePropertyCachingEnabled())
278            {
279                this.__one2OnePrimary5aSet = true;
280            }
281        }
282        return one2OnePrimary5a;
283    }
284
285   /**
286    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getCollectionType()
287    * @return String
288    */
289    protected abstract String handleGetCollectionType();
290
291    private String __collectionType6a;
292    private boolean __collectionType6aSet = false;
293
294    /**
295     * TODO: Model Documentation for
296     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.collectionType
297     * @return (String)handleGetCollectionType()
298     */
299    public final String getCollectionType()
300    {
301        String collectionType6a = this.__collectionType6a;
302        if (!this.__collectionType6aSet)
303        {
304            // collectionType has no pre constraints
305            collectionType6a = handleGetCollectionType();
306            // collectionType has no post constraints
307            this.__collectionType6a = collectionType6a;
308            if (isMetafacadePropertyCachingEnabled())
309            {
310                this.__collectionType6aSet = true;
311            }
312        }
313        return collectionType6a;
314    }
315
316   /**
317    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getSortType()
318    * @return String
319    */
320    protected abstract String handleGetSortType();
321
322    private String __sortType7a;
323    private boolean __sortType7aSet = false;
324
325    /**
326     * TODO: Model Documentation for
327     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.sortType
328     * @return (String)handleGetSortType()
329     */
330    public final String getSortType()
331    {
332        String sortType7a = this.__sortType7a;
333        if (!this.__sortType7aSet)
334        {
335            // sortType has no pre constraints
336            sortType7a = handleGetSortType();
337            // sortType has no post constraints
338            this.__sortType7a = sortType7a;
339            if (isMetafacadePropertyCachingEnabled())
340            {
341                this.__sortType7aSet = true;
342            }
343        }
344        return sortType7a;
345    }
346
347   /**
348    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getOrderByColumns()
349    * @return String
350    */
351    protected abstract String handleGetOrderByColumns();
352
353    private String __orderByColumns8a;
354    private boolean __orderByColumns8aSet = false;
355
356    /**
357     * TODO: Model Documentation for
358     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.orderByColumns
359     * @return (String)handleGetOrderByColumns()
360     */
361    public final String getOrderByColumns()
362    {
363        String orderByColumns8a = this.__orderByColumns8a;
364        if (!this.__orderByColumns8aSet)
365        {
366            // orderByColumns has no pre constraints
367            orderByColumns8a = handleGetOrderByColumns();
368            // orderByColumns has no post constraints
369            this.__orderByColumns8a = orderByColumns8a;
370            if (isMetafacadePropertyCachingEnabled())
371            {
372                this.__orderByColumns8aSet = true;
373            }
374        }
375        return orderByColumns8a;
376    }
377
378   /**
379    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getWhereClause()
380    * @return String
381    */
382    protected abstract String handleGetWhereClause();
383
384    private String __whereClause9a;
385    private boolean __whereClause9aSet = false;
386
387    /**
388     * TODO: Model Documentation for
389     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.whereClause
390     * @return (String)handleGetWhereClause()
391     */
392    public final String getWhereClause()
393    {
394        String whereClause9a = this.__whereClause9a;
395        if (!this.__whereClause9aSet)
396        {
397            // whereClause has no pre constraints
398            whereClause9a = handleGetWhereClause();
399            // whereClause has no post constraints
400            this.__whereClause9a = whereClause9a;
401            if (isMetafacadePropertyCachingEnabled())
402            {
403                this.__whereClause9aSet = true;
404            }
405        }
406        return whereClause9a;
407    }
408
409   /**
410    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isIndexedCollection()
411    * @return boolean
412    */
413    protected abstract boolean handleIsIndexedCollection();
414
415    private boolean __indexedCollection10a;
416    private boolean __indexedCollection10aSet = false;
417
418    /**
419     * TODO: Model Documentation for
420     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.indexedCollection
421     * @return (boolean)handleIsIndexedCollection()
422     */
423    public final boolean isIndexedCollection()
424    {
425        boolean indexedCollection10a = this.__indexedCollection10a;
426        if (!this.__indexedCollection10aSet)
427        {
428            // indexedCollection has no pre constraints
429            indexedCollection10a = handleIsIndexedCollection();
430            // indexedCollection has no post constraints
431            this.__indexedCollection10a = indexedCollection10a;
432            if (isMetafacadePropertyCachingEnabled())
433            {
434                this.__indexedCollection10aSet = true;
435            }
436        }
437        return indexedCollection10a;
438    }
439
440   /**
441    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getCollectionIndexName()
442    * @return String
443    */
444    protected abstract String handleGetCollectionIndexName();
445
446    private String __collectionIndexName11a;
447    private boolean __collectionIndexName11aSet = false;
448
449    /**
450     * TODO: Model Documentation for
451     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.collectionIndexName
452     * @return (String)handleGetCollectionIndexName()
453     */
454    public final String getCollectionIndexName()
455    {
456        String collectionIndexName11a = this.__collectionIndexName11a;
457        if (!this.__collectionIndexName11aSet)
458        {
459            // collectionIndexName has no pre constraints
460            collectionIndexName11a = handleGetCollectionIndexName();
461            // collectionIndexName has no post constraints
462            this.__collectionIndexName11a = collectionIndexName11a;
463            if (isMetafacadePropertyCachingEnabled())
464            {
465                this.__collectionIndexName11aSet = true;
466            }
467        }
468        return collectionIndexName11a;
469    }
470
471   /**
472    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isMap()
473    * @return boolean
474    */
475    protected abstract boolean handleIsMap();
476
477    private boolean __map12a;
478    private boolean __map12aSet = false;
479
480    /**
481     * TODO: Model Documentation for
482     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.map
483     * @return (boolean)handleIsMap()
484     */
485    public final boolean isMap()
486    {
487        boolean map12a = this.__map12a;
488        if (!this.__map12aSet)
489        {
490            // map has no pre constraints
491            map12a = handleIsMap();
492            // map has no post constraints
493            this.__map12a = map12a;
494            if (isMetafacadePropertyCachingEnabled())
495            {
496                this.__map12aSet = true;
497            }
498        }
499        return map12a;
500    }
501
502   /**
503    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isList()
504    * @return boolean
505    */
506    protected abstract boolean handleIsList();
507
508    private boolean __list13a;
509    private boolean __list13aSet = false;
510
511    /**
512     * TODO: Model Documentation for
513     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.list
514     * @return (boolean)handleIsList()
515     */
516    public final boolean isList()
517    {
518        boolean list13a = this.__list13a;
519        if (!this.__list13aSet)
520        {
521            // list has no pre constraints
522            list13a = handleIsList();
523            // list has no post constraints
524            this.__list13a = list13a;
525            if (isMetafacadePropertyCachingEnabled())
526            {
527                this.__list13aSet = true;
528            }
529        }
530        return list13a;
531    }
532
533   /**
534    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isSet()
535    * @return boolean
536    */
537    protected abstract boolean handleIsSet();
538
539    private boolean __set14a;
540    private boolean __set14aSet = false;
541
542    /**
543     * TODO: Model Documentation for
544     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.set
545     * @return (boolean)handleIsSet()
546     */
547    public final boolean isSet()
548    {
549        boolean set14a = this.__set14a;
550        if (!this.__set14aSet)
551        {
552            // set has no pre constraints
553            set14a = handleIsSet();
554            // set has no post constraints
555            this.__set14a = set14a;
556            if (isMetafacadePropertyCachingEnabled())
557            {
558                this.__set14aSet = true;
559            }
560        }
561        return set14a;
562    }
563
564   /**
565    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isBag()
566    * @return boolean
567    */
568    protected abstract boolean handleIsBag();
569
570    private boolean __bag15a;
571    private boolean __bag15aSet = false;
572
573    /**
574     * TODO: Model Documentation for
575     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.bag
576     * @return (boolean)handleIsBag()
577     */
578    public final boolean isBag()
579    {
580        boolean bag15a = this.__bag15a;
581        if (!this.__bag15aSet)
582        {
583            // bag has no pre constraints
584            bag15a = handleIsBag();
585            // bag has no post constraints
586            this.__bag15a = bag15a;
587            if (isMetafacadePropertyCachingEnabled())
588            {
589                this.__bag15aSet = true;
590            }
591        }
592        return bag15a;
593    }
594
595   /**
596    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getCollectionIndexType()
597    * @return String
598    */
599    protected abstract String handleGetCollectionIndexType();
600
601    private String __collectionIndexType16a;
602    private boolean __collectionIndexType16aSet = false;
603
604    /**
605     * this will only apply for Maps, it will return the type of the attribute specified on the
606     * CollectionIndexName tagged value
607     * @return (String)handleGetCollectionIndexType()
608     */
609    public final String getCollectionIndexType()
610    {
611        String collectionIndexType16a = this.__collectionIndexType16a;
612        if (!this.__collectionIndexType16aSet)
613        {
614            // collectionIndexType has no pre constraints
615            collectionIndexType16a = handleGetCollectionIndexType();
616            // collectionIndexType has no post constraints
617            this.__collectionIndexType16a = collectionIndexType16a;
618            if (isMetafacadePropertyCachingEnabled())
619            {
620                this.__collectionIndexType16aSet = true;
621            }
622        }
623        return collectionIndexType16a;
624    }
625
626   /**
627    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getCollectionTypeImplementation()
628    * @return String
629    */
630    protected abstract String handleGetCollectionTypeImplementation();
631
632    private String __collectionTypeImplementation17a;
633    private boolean __collectionTypeImplementation17aSet = false;
634
635    /**
636     * The actual implementation of the collection type.
637     * @return (String)handleGetCollectionTypeImplementation()
638     */
639    public final String getCollectionTypeImplementation()
640    {
641        String collectionTypeImplementation17a = this.__collectionTypeImplementation17a;
642        if (!this.__collectionTypeImplementation17aSet)
643        {
644            // collectionTypeImplementation has no pre constraints
645            collectionTypeImplementation17a = handleGetCollectionTypeImplementation();
646            // collectionTypeImplementation has no post constraints
647            this.__collectionTypeImplementation17a = collectionTypeImplementation17a;
648            if (isMetafacadePropertyCachingEnabled())
649            {
650                this.__collectionTypeImplementation17aSet = true;
651            }
652        }
653        return collectionTypeImplementation17a;
654    }
655
656   /**
657    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getHibernateAggregationCascade()
658    * @return String
659    */
660    protected abstract String handleGetHibernateAggregationCascade();
661
662    private String __hibernateAggregationCascade18a;
663    private boolean __hibernateAggregationCascade18aSet = false;
664
665    /**
666     * Stores the value indicating how a UML aggregation should be interpreted as cascade.
667     * @return (String)handleGetHibernateAggregationCascade()
668     */
669    public final String getHibernateAggregationCascade()
670    {
671        String hibernateAggregationCascade18a = this.__hibernateAggregationCascade18a;
672        if (!this.__hibernateAggregationCascade18aSet)
673        {
674            // hibernateAggregationCascade has no pre constraints
675            hibernateAggregationCascade18a = handleGetHibernateAggregationCascade();
676            // hibernateAggregationCascade has no post constraints
677            this.__hibernateAggregationCascade18a = hibernateAggregationCascade18a;
678            if (isMetafacadePropertyCachingEnabled())
679            {
680                this.__hibernateAggregationCascade18aSet = true;
681            }
682        }
683        return hibernateAggregationCascade18a;
684    }
685
686   /**
687    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getHibernateCompositionCascade()
688    * @return String
689    */
690    protected abstract String handleGetHibernateCompositionCascade();
691
692    private String __hibernateCompositionCascade19a;
693    private boolean __hibernateCompositionCascade19aSet = false;
694
695    /**
696     * Stores the value indicating how a UML composition should be interpreted as cascade.
697     * @return (String)handleGetHibernateCompositionCascade()
698     */
699    public final String getHibernateCompositionCascade()
700    {
701        String hibernateCompositionCascade19a = this.__hibernateCompositionCascade19a;
702        if (!this.__hibernateCompositionCascade19aSet)
703        {
704            // hibernateCompositionCascade has no pre constraints
705            hibernateCompositionCascade19a = handleGetHibernateCompositionCascade();
706            // hibernateCompositionCascade has no post constraints
707            this.__hibernateCompositionCascade19a = hibernateCompositionCascade19a;
708            if (isMetafacadePropertyCachingEnabled())
709            {
710                this.__hibernateCompositionCascade19aSet = true;
711            }
712        }
713        return hibernateCompositionCascade19a;
714    }
715
716   /**
717    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isBidirectionalOrderedListChild()
718    * @return boolean
719    */
720    protected abstract boolean handleIsBidirectionalOrderedListChild();
721
722    private boolean __bidirectionalOrderedListChild20a;
723    private boolean __bidirectionalOrderedListChild20aSet = false;
724
725    /**
726     * TODO: Model Documentation for
727     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.bidirectionalOrderedListChild
728     * @return (boolean)handleIsBidirectionalOrderedListChild()
729     */
730    public final boolean isBidirectionalOrderedListChild()
731    {
732        boolean bidirectionalOrderedListChild20a = this.__bidirectionalOrderedListChild20a;
733        if (!this.__bidirectionalOrderedListChild20aSet)
734        {
735            // bidirectionalOrderedListChild has no pre constraints
736            bidirectionalOrderedListChild20a = handleIsBidirectionalOrderedListChild();
737            // bidirectionalOrderedListChild has no post constraints
738            this.__bidirectionalOrderedListChild20a = bidirectionalOrderedListChild20a;
739            if (isMetafacadePropertyCachingEnabled())
740            {
741                this.__bidirectionalOrderedListChild20aSet = true;
742            }
743        }
744        return bidirectionalOrderedListChild20a;
745    }
746
747   /**
748    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isBidirectionalOrderedListParent()
749    * @return boolean
750    */
751    protected abstract boolean handleIsBidirectionalOrderedListParent();
752
753    private boolean __bidirectionalOrderedListParent21a;
754    private boolean __bidirectionalOrderedListParent21aSet = false;
755
756    /**
757     * TODO: Model Documentation for
758     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.bidirectionalOrderedListParent
759     * @return (boolean)handleIsBidirectionalOrderedListParent()
760     */
761    public final boolean isBidirectionalOrderedListParent()
762    {
763        boolean bidirectionalOrderedListParent21a = this.__bidirectionalOrderedListParent21a;
764        if (!this.__bidirectionalOrderedListParent21aSet)
765        {
766            // bidirectionalOrderedListParent has no pre constraints
767            bidirectionalOrderedListParent21a = handleIsBidirectionalOrderedListParent();
768            // bidirectionalOrderedListParent has no post constraints
769            this.__bidirectionalOrderedListParent21a = bidirectionalOrderedListParent21a;
770            if (isMetafacadePropertyCachingEnabled())
771            {
772                this.__bidirectionalOrderedListParent21aSet = true;
773            }
774        }
775        return bidirectionalOrderedListParent21a;
776    }
777
778   /**
779    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getEmbedXML()
780    * @return String
781    */
782    protected abstract String handleGetEmbedXML();
783
784    private String __embedXML22a;
785    private boolean __embedXML22aSet = false;
786
787    /**
788     * TODO: Model Documentation for
789     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.embedXML
790     * @return (String)handleGetEmbedXML()
791     */
792    public final String getEmbedXML()
793    {
794        String embedXML22a = this.__embedXML22a;
795        if (!this.__embedXML22aSet)
796        {
797            // embedXML has no pre constraints
798            embedXML22a = handleGetEmbedXML();
799            // embedXML has no post constraints
800            this.__embedXML22a = embedXML22a;
801            if (isMetafacadePropertyCachingEnabled())
802            {
803                this.__embedXML22aSet = true;
804            }
805        }
806        return embedXML22a;
807    }
808
809   /**
810    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#getXmlTagName()
811    * @return String
812    */
813    protected abstract String handleGetXmlTagName();
814
815    private String __xmlTagName23a;
816    private boolean __xmlTagName23aSet = false;
817
818    /**
819     * TODO: Model Documentation for
820     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.xmlTagName
821     * @return (String)handleGetXmlTagName()
822     */
823    public final String getXmlTagName()
824    {
825        String xmlTagName23a = this.__xmlTagName23a;
826        if (!this.__xmlTagName23aSet)
827        {
828            // xmlTagName has no pre constraints
829            xmlTagName23a = handleGetXmlTagName();
830            // xmlTagName has no post constraints
831            this.__xmlTagName23a = xmlTagName23a;
832            if (isMetafacadePropertyCachingEnabled())
833            {
834                this.__xmlTagName23aSet = true;
835            }
836        }
837        return xmlTagName23a;
838    }
839
840   /**
841    * @see org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd#isOwning()
842    * @return boolean
843    */
844    protected abstract boolean handleIsOwning();
845
846    private boolean __owning24a;
847    private boolean __owning24aSet = false;
848
849    /**
850     * TODO: Model Documentation for
851     * org.andromda.cartridges.hibernate.metafacades.HibernateAssociationEnd.owning
852     * @return (boolean)handleIsOwning()
853     */
854    public final boolean isOwning()
855    {
856        boolean owning24a = this.__owning24a;
857        if (!this.__owning24aSet)
858        {
859            // owning has no pre constraints
860            owning24a = handleIsOwning();
861            // owning has no post constraints
862            this.__owning24a = owning24a;
863            if (isMetafacadePropertyCachingEnabled())
864            {
865                this.__owning24aSet = true;
866            }
867        }
868        return owning24a;
869    }
870
871    /**
872     * @return true
873     * @see EntityAssociationEnd
874     */
875    public boolean isEntityAssociationEndMetaType()
876    {
877        return true;
878    }
879
880    /**
881     * @return true
882     * @see AssociationEndFacade
883     */
884    public boolean isAssociationEndFacadeMetaType()
885    {
886        return true;
887    }
888
889    /**
890     * @return true
891     * @see ModelElementFacade
892     */
893    public boolean isModelElementFacadeMetaType()
894    {
895        return true;
896    }
897
898    // ----------- delegates to EntityAssociationEnd ------------
899    /**
900     * A name suitable for use when adding new elements to this association end in programming code.
901     * @see AssociationEndFacade#getAdderName()
902     */
903    public String getAdderName()
904    {
905        return this.getSuperEntityAssociationEnd().getAdderName();
906    }
907
908    /**
909     * Returns the value of the 'Aggregation' attribute (none, shared, composite). The default value
910     * is "none". The literals are from the enumeration org.eclipse.uml2.uml.AggregationKind.
911     * Specifies the kind of aggregation that applies to the Property.
912     * @see AssociationEndFacade#getAggregationKind()
913     */
914    public String getAggregationKind()
915    {
916        return this.getSuperEntityAssociationEnd().getAggregationKind();
917    }
918
919    /**
920     * The association owning this association end.
921     * @see AssociationEndFacade#getAssociation()
922     */
923    public AssociationFacade getAssociation()
924    {
925        return this.getSuperEntityAssociationEnd().getAssociation();
926    }
927
928    /**
929     * UML2: Returns the value of the 'Default' attribute. Specifies a String that represents a
930     * value to be used when no argument is supplied for the Property. A String that is evaluated to
931     * give a default value for the Property when an object of the owning Classifier is
932     * instantiated.  Can be something like: new ValueObject(values);
933     * @see AssociationEndFacade#getDefault()
934     */
935    public String getDefault()
936    {
937        return this.getSuperEntityAssociationEnd().getDefault();
938    }
939
940    /**
941     * A name suitable for use when accessing this association end in programming code.
942     * @see AssociationEndFacade#getGetterName()
943     */
944    public String getGetterName()
945    {
946        return this.getSuperEntityAssociationEnd().getGetterName();
947    }
948
949    /**
950     * The name of the type that is returned on the accessor and mutator operations,  determined in
951     * part by the multiplicity.
952     * @see AssociationEndFacade#getGetterSetterTypeName()
953     */
954    public String getGetterSetterTypeName()
955    {
956        return this.getSuperEntityAssociationEnd().getGetterSetterTypeName();
957    }
958
959    /**
960     * the lower value for the multiplicity
961     * -only applicable for UML2
962     * @see AssociationEndFacade#getLower()
963     */
964    public int getLower()
965    {
966        return this.getSuperEntityAssociationEnd().getLower();
967    }
968
969    /**
970     * The other association end owned by this end's association.
971     * @see AssociationEndFacade#getOtherEnd()
972     */
973    public AssociationEndFacade getOtherEnd()
974    {
975        return this.getSuperEntityAssociationEnd().getOtherEnd();
976    }
977
978    /**
979     * A name suitable for use when removing element from this association end in programming code.
980     * @see AssociationEndFacade#getRemoverName()
981     */
982    public String getRemoverName()
983    {
984        return this.getSuperEntityAssociationEnd().getRemoverName();
985    }
986
987    /**
988     * A name suitable for use when accessing this association end in programming code.
989     * @see AssociationEndFacade#getSetterName()
990     */
991    public String getSetterName()
992    {
993        return this.getSuperEntityAssociationEnd().getSetterName();
994    }
995
996    /**
997     * The classifier attached to this association end.
998     * @see AssociationEndFacade#getType()
999     */
1000    public ClassifierFacade getType()
1001    {
1002        return this.getSuperEntityAssociationEnd().getType();
1003    }
1004
1005    /**
1006     * the upper value for the multiplicity (will be -1 for *)
1007     * -only applicable for UML2
1008     * @see AssociationEndFacade#getUpper()
1009     */
1010    public int getUpper()
1011    {
1012        return this.getSuperEntityAssociationEnd().getUpper();
1013    }
1014
1015    /**
1016     * True if this association end represents an aggregation relationship.
1017     * @see AssociationEndFacade#isAggregation()
1018     */
1019    public boolean isAggregation()
1020    {
1021        return this.getSuperEntityAssociationEnd().isAggregation();
1022    }
1023
1024    /**
1025     * Is true if update of one side of the association should also update the other side. false if
1026     * not.
1027     * @see AssociationEndFacade#isBidirectional()
1028     */
1029    public boolean isBidirectional()
1030    {
1031        return this.getSuperEntityAssociationEnd().isBidirectional();
1032    }
1033
1034    /**
1035     * Returns whether or not (true/false) this association end is the child end of the assocation
1036     * (i.e. the other end's aggregation is composition).
1037     * @see AssociationEndFacade#isChild()
1038     */
1039    public boolean isChild()
1040    {
1041        return this.getSuperEntityAssociationEnd().isChild();
1042    }
1043
1044    /**
1045     * True if this association end represents a composition relationship.
1046     * @see AssociationEndFacade#isComposition()
1047     */
1048    public boolean isComposition()
1049    {
1050        return this.getSuperEntityAssociationEnd().isComposition();
1051    }
1052
1053    /**
1054     * If the association end is derived (its value is computed). UML2 only. UML14 always returns
1055     * false. Default=false.
1056     * @see AssociationEndFacade#isDerived()
1057     */
1058    public boolean isDerived()
1059    {
1060        return this.getSuperEntityAssociationEnd().isDerived();
1061    }
1062
1063    /**
1064     * IsLeaf property in the association end property. If true, attribute is final, cannot be
1065     * extended or implemented by a descendant. Default=false.
1066     * @see AssociationEndFacade#isLeaf()
1067     */
1068    public boolean isLeaf()
1069    {
1070        return this.getSuperEntityAssociationEnd().isLeaf();
1071    }
1072
1073    /**
1074     * True if this association end's multiplicity is greater than one.
1075     * @see AssociationEndFacade#isMany()
1076     */
1077    public boolean isMany()
1078    {
1079        return this.getSuperEntityAssociationEnd().isMany();
1080    }
1081
1082    /**
1083     * True if this association end's and the other end's multiplicities are both many.
1084     * @see AssociationEndFacade#isMany2Many()
1085     */
1086    public boolean isMany2Many()
1087    {
1088        return this.getSuperEntityAssociationEnd().isMany2Many();
1089    }
1090
1091    /**
1092     * True if this association end's multiplicity is many while the other end's is one.
1093     * @see AssociationEndFacade#isMany2One()
1094     */
1095    public boolean isMany2One()
1096    {
1097        return this.getSuperEntityAssociationEnd().isMany2One();
1098    }
1099
1100    /**
1101     * True if it is possible to navigate from the other end to this association end .
1102     * @see AssociationEndFacade#isNavigable()
1103     */
1104    public boolean isNavigable()
1105    {
1106        return this.getSuperEntityAssociationEnd().isNavigable();
1107    }
1108
1109    /**
1110     * True if this association end's multiplicity is one while the other end's is many.
1111     * @see AssociationEndFacade#isOne2Many()
1112     */
1113    public boolean isOne2Many()
1114    {
1115        return this.getSuperEntityAssociationEnd().isOne2Many();
1116    }
1117
1118    /**
1119     * True if this association end's and the other end's multiplicities are both one.
1120     * @see AssociationEndFacade#isOne2One()
1121     */
1122    public boolean isOne2One()
1123    {
1124        return this.getSuperEntityAssociationEnd().isOne2One();
1125    }
1126
1127    /**
1128     * Indicates whether or not the association ends are ordered (if multiplicity is greater than
1129     * 1).
1130     * @see AssociationEndFacade#isOrdered()
1131     */
1132    public boolean isOrdered()
1133    {
1134        return this.getSuperEntityAssociationEnd().isOrdered();
1135    }
1136
1137    /**
1138     * True if the association end cannot be changed.
1139     * @see AssociationEndFacade#isReadOnly()
1140     */
1141    public boolean isReadOnly()
1142    {
1143        return this.getSuperEntityAssociationEnd().isReadOnly();
1144    }
1145
1146    /**
1147     * True if this association end's multiplicity is strictly greater than zero.
1148     * @see AssociationEndFacade#isRequired()
1149     */
1150    public boolean isRequired()
1151    {
1152        return this.getSuperEntityAssociationEnd().isRequired();
1153    }
1154
1155    /**
1156     * Indicates if this associationEnd is 'static', meaning it has a classifier scope.
1157     * @see AssociationEndFacade#isStatic()
1158     */
1159    public boolean isStatic()
1160    {
1161        return this.getSuperEntityAssociationEnd().isStatic();
1162    }
1163
1164    /**
1165     * UML2: If the association attribute is unique within the Collection type. UML14 always returns
1166     * false. Unique+Ordered determines the implementation Collection type. Default=false.
1167     * @see AssociationEndFacade#isUnique()
1168     */
1169    public boolean isUnique()
1170    {
1171        return this.getSuperEntityAssociationEnd().isUnique();
1172    }
1173
1174    /**
1175     * The name of the index to create on a column that persists the foreign key attribute.
1176     * @see EntityAssociationEnd#getColumnIndex()
1177     */
1178    public String getColumnIndex()
1179    {
1180        return this.getSuperEntityAssociationEnd().getColumnIndex();
1181    }
1182
1183    /**
1184     * The name of the column that makes up the foreign key.
1185     * @see EntityAssociationEnd#getColumnName()
1186     */
1187    public String getColumnName()
1188    {
1189        return this.getSuperEntityAssociationEnd().getColumnName();
1190    }
1191
1192    /**
1193     * The name of the foreign key constraint to use for databases.
1194     * @see EntityAssociationEnd#getForeignKeyConstraintName()
1195     */
1196    public String getForeignKeyConstraintName()
1197    {
1198        return this.getSuperEntityAssociationEnd().getForeignKeyConstraintName();
1199    }
1200
1201    /**
1202     * The current foreign key suffix specified for this entity association end facade.
1203     * @see EntityAssociationEnd#getForeignKeySuffix()
1204     */
1205    public String getForeignKeySuffix()
1206    {
1207        return this.getSuperEntityAssociationEnd().getForeignKeySuffix();
1208    }
1209
1210    /**
1211     * The SQL type for this the foreign key column of this association end.
1212     * @see EntityAssociationEnd#getSqlType()
1213     */
1214    public String getSqlType()
1215    {
1216        return this.getSuperEntityAssociationEnd().getSqlType();
1217    }
1218
1219    /**
1220     * The name of the unique-key that this unique association end belongs
1221     * @see EntityAssociationEnd#getUniqueGroup()
1222     */
1223    public String getUniqueGroup()
1224    {
1225        return this.getSuperEntityAssociationEnd().getUniqueGroup();
1226    }
1227
1228    /**
1229     * Indicates whether or not a foreign identifier should be used for the entity that owns this
1230     * association end.  This would only make sense in the case of a child in a one-to-one
1231     * parent-child association.  If this flag is true, then the identifier of this entity should
1232     * also be used as the foreign key to the related parent entity.
1233     * @see EntityAssociationEnd#isForeignIdentifier()
1234     */
1235    public boolean isForeignIdentifier()
1236    {
1237        return this.getSuperEntityAssociationEnd().isForeignIdentifier();
1238    }
1239
1240    /**
1241     * True if this association is an identifier for its entity.
1242     * @see EntityAssociationEnd#isIdentifier()
1243     */
1244    public boolean isIdentifier()
1245    {
1246        return this.getSuperEntityAssociationEnd().isIdentifier();
1247    }
1248
1249    /**
1250     * True if the associationEnd is marked with identifiers stereotype, false otherwise.
1251     * @see EntityAssociationEnd#isIdentifiersPresent()
1252     */
1253    public boolean isIdentifiersPresent()
1254    {
1255        return this.getSuperEntityAssociationEnd().isIdentifiersPresent();
1256    }
1257
1258    /**
1259     * Indicates this association end should be ignored by the persistence layer.
1260     * @see EntityAssociationEnd#isTransient()
1261     */
1262    public boolean isTransient()
1263    {
1264        return this.getSuperEntityAssociationEnd().isTransient();
1265    }
1266
1267    /**
1268     * Copies all tagged values from the given ModelElementFacade to this model element facade.
1269     * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
1270     */
1271    public void copyTaggedValues(ModelElementFacade element)
1272    {
1273        this.getSuperEntityAssociationEnd().copyTaggedValues(element);
1274    }
1275
1276    /**
1277     * Finds the tagged value with the specified 'tagName'. In case there are more values the first
1278     * one found will be returned.
1279     * @see ModelElementFacade#findTaggedValue(String tagName)
1280     */
1281    public Object findTaggedValue(String tagName)
1282    {
1283        return this.getSuperEntityAssociationEnd().findTaggedValue(tagName);
1284    }
1285
1286    /**
1287     * Returns all the values for the tagged value with the specified name. The returned collection
1288     * will contains only String instances, or will be empty. Never null.
1289     * @see ModelElementFacade#findTaggedValues(String tagName)
1290     */
1291    public Collection<Object> findTaggedValues(String tagName)
1292    {
1293        return this.getSuperEntityAssociationEnd().findTaggedValues(tagName);
1294    }
1295
1296    /**
1297     * Returns the fully qualified name of the model element. The fully qualified name includes
1298     * complete package qualified name of the underlying model element. The templates parameter will
1299     * be replaced by the correct one given the binding relation of the parameter to this element.
1300     * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1301     */
1302    public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1303    {
1304        return this.getSuperEntityAssociationEnd().getBindedFullyQualifiedName(bindedElement);
1305    }
1306
1307    /**
1308     * Gets all constraints belonging to the model element.
1309     * @see ModelElementFacade#getConstraints()
1310     */
1311    public Collection<ConstraintFacade> getConstraints()
1312    {
1313        return this.getSuperEntityAssociationEnd().getConstraints();
1314    }
1315
1316    /**
1317     * Returns the constraints of the argument kind that have been placed onto this model. Typical
1318     * kinds are "inv", "pre" and "post". Other kinds are possible.
1319     * @see ModelElementFacade#getConstraints(String kind)
1320     */
1321    public Collection<ConstraintFacade> getConstraints(String kind)
1322    {
1323        return this.getSuperEntityAssociationEnd().getConstraints(kind);
1324    }
1325
1326    /**
1327     * Gets the documentation for the model element, The indent argument is prefixed to each line.
1328     * By default this method wraps lines after 64 characters.
1329     * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
1330     * @see ModelElementFacade#getDocumentation(String indent)
1331     */
1332    public String getDocumentation(String indent)
1333    {
1334        return this.getSuperEntityAssociationEnd().getDocumentation(indent);
1335    }
1336
1337    /**
1338     * This method returns the documentation for this model element, with the lines wrapped after
1339     * the specified number of characters, values of less than 1 will indicate no line wrapping is
1340     * required. By default paragraphs are returned as HTML.
1341     * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
1342     * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
1343     */
1344    public String getDocumentation(String indent, int lineLength)
1345    {
1346        return this.getSuperEntityAssociationEnd().getDocumentation(indent, lineLength);
1347    }
1348
1349    /**
1350     * This method returns the documentation for this model element, with the lines wrapped after
1351     * the specified number of characters, values of less than 1 will indicate no line wrapping is
1352     * required. HTML style determines if HTML Escaping is applied.
1353     * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
1354     */
1355    public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
1356    {
1357        return this.getSuperEntityAssociationEnd().getDocumentation(indent, lineLength, htmlStyle);
1358    }
1359
1360    /**
1361     * The fully qualified name of this model element.
1362     * @see ModelElementFacade#getFullyQualifiedName()
1363     */
1364    public String getFullyQualifiedName()
1365    {
1366        return this.getSuperEntityAssociationEnd().getFullyQualifiedName();
1367    }
1368
1369    /**
1370     * Returns the fully qualified name of the model element. The fully qualified name includes
1371     * complete package qualified name of the underlying model element.  If modelName is true, then
1372     * the original name of the model element (the name contained within the model) will be the name
1373     * returned, otherwise a name from a language mapping will be returned.
1374     * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
1375     */
1376    public String getFullyQualifiedName(boolean modelName)
1377    {
1378        return this.getSuperEntityAssociationEnd().getFullyQualifiedName(modelName);
1379    }
1380
1381    /**
1382     * Returns the fully qualified name as a path, the returned value always starts with out a slash
1383     * '/'.
1384     * @see ModelElementFacade#getFullyQualifiedNamePath()
1385     */
1386    public String getFullyQualifiedNamePath()
1387    {
1388        return this.getSuperEntityAssociationEnd().getFullyQualifiedNamePath();
1389    }
1390
1391    /**
1392     * Gets the unique identifier of the underlying model element.
1393     * @see ModelElementFacade#getId()
1394     */
1395    public String getId()
1396    {
1397        return this.getSuperEntityAssociationEnd().getId();
1398    }
1399
1400    /**
1401     * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
1402     * are not represented by other properties, i.e. native, transient, volatile, synchronized,
1403     * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
1404     * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
1405     * JDK5 compiler level.
1406     * @see ModelElementFacade#getKeywords()
1407     */
1408    public Collection<String> getKeywords()
1409    {
1410        return this.getSuperEntityAssociationEnd().getKeywords();
1411    }
1412
1413    /**
1414     * UML2: Retrieves a localized label for this named element.
1415     * @see ModelElementFacade#getLabel()
1416     */
1417    public String getLabel()
1418    {
1419        return this.getSuperEntityAssociationEnd().getLabel();
1420    }
1421
1422    /**
1423     * The language mappings that have been set for this model element.
1424     * @see ModelElementFacade#getLanguageMappings()
1425     */
1426    public TypeMappings getLanguageMappings()
1427    {
1428        return this.getSuperEntityAssociationEnd().getLanguageMappings();
1429    }
1430
1431    /**
1432     * Return the model containing this model element (multiple models may be loaded and processed
1433     * at the same time).
1434     * @see ModelElementFacade#getModel()
1435     */
1436    public ModelFacade getModel()
1437    {
1438        return this.getSuperEntityAssociationEnd().getModel();
1439    }
1440
1441    /**
1442     * The name of the model element.
1443     * @see ModelElementFacade#getName()
1444     */
1445    public String getName()
1446    {
1447        return this.getSuperEntityAssociationEnd().getName();
1448    }
1449
1450    /**
1451     * Gets the package to which this model element belongs.
1452     * @see ModelElementFacade#getPackage()
1453     */
1454    public ModelElementFacade getPackage()
1455    {
1456        return this.getSuperEntityAssociationEnd().getPackage();
1457    }
1458
1459    /**
1460     * The name of this model element's package.
1461     * @see ModelElementFacade#getPackageName()
1462     */
1463    public String getPackageName()
1464    {
1465        return this.getSuperEntityAssociationEnd().getPackageName();
1466    }
1467
1468    /**
1469     * Gets the package name (optionally providing the ability to retrieve the model name and not
1470     * the mapped name).
1471     * @see ModelElementFacade#getPackageName(boolean modelName)
1472     */
1473    public String getPackageName(boolean modelName)
1474    {
1475        return this.getSuperEntityAssociationEnd().getPackageName(modelName);
1476    }
1477
1478    /**
1479     * Returns the package as a path, the returned value always starts with out a slash '/'.
1480     * @see ModelElementFacade#getPackagePath()
1481     */
1482    public String getPackagePath()
1483    {
1484        return this.getSuperEntityAssociationEnd().getPackagePath();
1485    }
1486
1487    /**
1488     * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
1489     * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
1490     * the names of the containing namespaces starting at the root of the hierarchy and ending with
1491     * the name of the NamedElement itself.
1492     * @see ModelElementFacade#getQualifiedName()
1493     */
1494    public String getQualifiedName()
1495    {
1496        return this.getSuperEntityAssociationEnd().getQualifiedName();
1497    }
1498
1499    /**
1500     * Gets the root package for the model element.
1501     * @see ModelElementFacade#getRootPackage()
1502     */
1503    public PackageFacade getRootPackage()
1504    {
1505        return this.getSuperEntityAssociationEnd().getRootPackage();
1506    }
1507
1508    /**
1509     * Gets the dependencies for which this model element is the source.
1510     * @see ModelElementFacade#getSourceDependencies()
1511     */
1512    public Collection<DependencyFacade> getSourceDependencies()
1513    {
1514        return this.getSuperEntityAssociationEnd().getSourceDependencies();
1515    }
1516
1517    /**
1518     * If this model element is the context of an activity graph, this represents that activity
1519     * graph.
1520     * @see ModelElementFacade#getStateMachineContext()
1521     */
1522    public StateMachineFacade getStateMachineContext()
1523    {
1524        return this.getSuperEntityAssociationEnd().getStateMachineContext();
1525    }
1526
1527    /**
1528     * The collection of ALL stereotype names for this model element.
1529     * @see ModelElementFacade#getStereotypeNames()
1530     */
1531    public Collection<String> getStereotypeNames()
1532    {
1533        return this.getSuperEntityAssociationEnd().getStereotypeNames();
1534    }
1535
1536    /**
1537     * Gets all stereotypes for this model element.
1538     * @see ModelElementFacade#getStereotypes()
1539     */
1540    public Collection<StereotypeFacade> getStereotypes()
1541    {
1542        return this.getSuperEntityAssociationEnd().getStereotypes();
1543    }
1544
1545    /**
1546     * Return the TaggedValues associated with this model element, under all stereotypes.
1547     * @see ModelElementFacade#getTaggedValues()
1548     */
1549    public Collection<TaggedValueFacade> getTaggedValues()
1550    {
1551        return this.getSuperEntityAssociationEnd().getTaggedValues();
1552    }
1553
1554    /**
1555     * Gets the dependencies for which this model element is the target.
1556     * @see ModelElementFacade#getTargetDependencies()
1557     */
1558    public Collection<DependencyFacade> getTargetDependencies()
1559    {
1560        return this.getSuperEntityAssociationEnd().getTargetDependencies();
1561    }
1562
1563    /**
1564     * Get the template parameter for this model element having the parameterName
1565     * @see ModelElementFacade#getTemplateParameter(String parameterName)
1566     */
1567    public Object getTemplateParameter(String parameterName)
1568    {
1569        return this.getSuperEntityAssociationEnd().getTemplateParameter(parameterName);
1570    }
1571
1572    /**
1573     * Get the template parameters for this model element
1574     * @see ModelElementFacade#getTemplateParameters()
1575     */
1576    public Collection<TemplateParameterFacade> getTemplateParameters()
1577    {
1578        return this.getSuperEntityAssociationEnd().getTemplateParameters();
1579    }
1580
1581    /**
1582     * The visibility (i.e. public, private, protected or package) of the model element, will
1583     * attempt a lookup for these values in the language mappings (if any).
1584     * @see ModelElementFacade#getVisibility()
1585     */
1586    public String getVisibility()
1587    {
1588        return this.getSuperEntityAssociationEnd().getVisibility();
1589    }
1590
1591    /**
1592     * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
1593     * is taken into account when searching for the stereotype), false otherwise.
1594     * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
1595     */
1596    public boolean hasExactStereotype(String stereotypeName)
1597    {
1598        return this.getSuperEntityAssociationEnd().hasExactStereotype(stereotypeName);
1599    }
1600
1601    /**
1602     * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
1603     * pipe, semicolon, or << >>
1604     * @see ModelElementFacade#hasKeyword(String keywordName)
1605     */
1606    public boolean hasKeyword(String keywordName)
1607    {
1608        return this.getSuperEntityAssociationEnd().hasKeyword(keywordName);
1609    }
1610
1611    /**
1612     * Returns true if the model element has the specified stereotype.  If the stereotype itself
1613     * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
1614     * one of the stereotype's ancestors has a matching name this method will return true, false
1615     * otherwise.
1616     * For example, if we have a certain stereotype called <<exception>> and a model element has a
1617     * stereotype called <<applicationException>> which extends <<exception>>, when calling this
1618     * method with 'stereotypeName' defined as 'exception' the method would return true since
1619     * <<applicationException>> inherits from <<exception>>.  If you want to check if the model
1620     * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
1621     * @see ModelElementFacade#hasStereotype(String stereotypeName)
1622     */
1623    public boolean hasStereotype(String stereotypeName)
1624    {
1625        return this.getSuperEntityAssociationEnd().hasStereotype(stereotypeName);
1626    }
1627
1628    /**
1629     * True if there are target dependencies from this element that are instances of BindingFacade.
1630     * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
1631     * @see ModelElementFacade#isBindingDependenciesPresent()
1632     */
1633    public boolean isBindingDependenciesPresent()
1634    {
1635        return this.getSuperEntityAssociationEnd().isBindingDependenciesPresent();
1636    }
1637
1638    /**
1639     * Indicates if any constraints are present on this model element.
1640     * @see ModelElementFacade#isConstraintsPresent()
1641     */
1642    public boolean isConstraintsPresent()
1643    {
1644        return this.getSuperEntityAssociationEnd().isConstraintsPresent();
1645    }
1646
1647    /**
1648     * Indicates if any documentation is present on this model element.
1649     * @see ModelElementFacade#isDocumentationPresent()
1650     */
1651    public boolean isDocumentationPresent()
1652    {
1653        return this.getSuperEntityAssociationEnd().isDocumentationPresent();
1654    }
1655
1656    /**
1657     * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
1658     * @see ModelElementFacade#isReservedWord()
1659     */
1660    public boolean isReservedWord()
1661    {
1662        return this.getSuperEntityAssociationEnd().isReservedWord();
1663    }
1664
1665    /**
1666     * True is there are template parameters on this model element. For UML2, applies to Class,
1667     * Operation, Property, and Parameter.
1668     * @see ModelElementFacade#isTemplateParametersPresent()
1669     */
1670    public boolean isTemplateParametersPresent()
1671    {
1672        return this.getSuperEntityAssociationEnd().isTemplateParametersPresent();
1673    }
1674
1675    /**
1676     * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
1677     * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
1678     * Enumerations and Interfaces, optionally applies on other model elements.
1679     * @see ModelElementFacade#isValidIdentifierName()
1680     */
1681    public boolean isValidIdentifierName()
1682    {
1683        return this.getSuperEntityAssociationEnd().isValidIdentifierName();
1684    }
1685
1686    /**
1687     * Searches for the constraint with the specified 'name' on this model element, and if found
1688     * translates it using the specified 'translation' from a translation library discovered by the
1689     * framework.
1690     * @see ModelElementFacade#translateConstraint(String name, String translation)
1691     */
1692    public String translateConstraint(String name, String translation)
1693    {
1694        return this.getSuperEntityAssociationEnd().translateConstraint(name, translation);
1695    }
1696
1697    /**
1698     * Translates all constraints belonging to this model element with the given 'translation'.
1699     * @see ModelElementFacade#translateConstraints(String translation)
1700     */
1701    public String[] translateConstraints(String translation)
1702    {
1703        return this.getSuperEntityAssociationEnd().translateConstraints(translation);
1704    }
1705
1706    /**
1707     * Translates the constraints of the specified 'kind' belonging to this model element.
1708     * @see ModelElementFacade#translateConstraints(String kind, String translation)
1709     */
1710    public String[] translateConstraints(String kind, String translation)
1711    {
1712        return this.getSuperEntityAssociationEnd().translateConstraints(kind, translation);
1713    }
1714
1715    /**
1716     * @see MetafacadeBase#initialize()
1717     */
1718    @Override
1719    public void initialize()
1720    {
1721        this.getSuperEntityAssociationEnd().initialize();
1722    }
1723
1724    /**
1725     * @return Object getSuperEntityAssociationEnd().getValidationOwner()
1726     * @see MetafacadeBase#getValidationOwner()
1727     */
1728    @Override
1729    public Object getValidationOwner()
1730    {
1731        Object owner = this.getSuperEntityAssociationEnd().getValidationOwner();
1732        return owner;
1733    }
1734
1735    /**
1736     * @return String getSuperEntityAssociationEnd().getValidationName()
1737     * @see MetafacadeBase#getValidationName()
1738     */
1739    @Override
1740    public String getValidationName()
1741    {
1742        String name = this.getSuperEntityAssociationEnd().getValidationName();
1743        return name;
1744    }
1745
1746    /**
1747     * <p><b>Constraint:</b> org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::one-to-one associations must have aggregation on one side</p>
1748     * <p><b>Error:</b> One-to-one associations must either have one side flagged as primary (using andromda_persistence_associationEnd_primary) or have one side of the association indicating aggregation (aggregation defines the parent owning entity)</p>
1749     * <p><b>OCL:</b> context HibernateAssociationEnd inv: otherEnd.type.oclIsKindOf(HibernateEntity) and one2One  implies (one2OnePrimary or otherEnd.one2OnePrimary)</p>
1750     * <p><b>Constraint:</b> org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::ordered collections must have an index defined</p>
1751     * <p><b>Error:</b> Ordered collections (i.e. lists) must have an index defined.  You can define this with either the associationEndCollectionIndexName (to apply to all ordered collections in your model(s)), or andromda_hibernate_collection_index
1752to apply to a single ordered collection.</p>
1753     * <p><b>OCL:</b> context HibernateAssociationEnd 
1754inv: otherEnd.type.oclIsKindOf(HibernateEntity) and otherEnd.list implies otherEnd.collectionIndexName -> notEmpty()</p>
1755     * <p><b>Constraint:</b> org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::map collecions must have the index type defined.</p>
1756     * <p><b>Error:</b> Collections defined as maps must have an index and index type defined., you can define each with the associationEndCollectionIndexName and associationEndCollectionIndexType (to apply to all mapped collections in your model(s)), or andromda_hibernate_collection_index and andromda_hibernate_collection_index_type
1757to apply to a single ordered collection.</p>
1758     * <p><b>OCL:</b> context HibernateAssociationEnd 
1759inv: otherEnd.type.oclIsKindOf(HibernateEntity) and otherEnd.map implies (otherEnd.collectionIndexType -> notEmpty() and otherEnd.collectionIndexName -> notEmpty())</p>
1760     * @param validationMessages Collection<ModelValidationMessage>
1761     * @see MetafacadeBase#validateInvariants(Collection validationMessages)
1762     */
1763    @Override
1764    public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1765    {
1766        this.getSuperEntityAssociationEnd().validateInvariants(validationMessages);
1767        try
1768        {
1769            final Object contextElement = this.THIS();
1770            boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"otherEnd.type") instanceof HibernateEntity&&Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"one2One"))).booleanValue())).booleanValue()?(Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"one2OnePrimary"))).booleanValue()||Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"otherEnd.one2OnePrimary"))).booleanValue()):true));
1771            if (!constraintValid)
1772            {
1773                validationMessages.add(
1774                    new ModelValidationMessage(
1775                        (MetafacadeBase)contextElement ,
1776                        "org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::one-to-one associations must have aggregation on one side",
1777                        "One-to-one associations must either have one side flagged as primary (using andromda_persistence_associationEnd_primary) or have one side of the association indicating aggregation (aggregation defines the parent owning entity)"));
1778            }
1779        }
1780        catch (Throwable th)
1781        {
1782            Throwable cause = th.getCause();
1783            int depth = 0; // Some throwables have infinite recursion
1784            while (cause != null && depth < 7)
1785            {
1786                th = cause;
1787                depth++;
1788            }
1789            logger.error("Error validating constraint 'org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::one-to-one associations must have aggregation on one side' ON "
1790                + this.THIS().toString() + ": " + th.getMessage(), th);
1791        }
1792        try
1793        {
1794            final Object contextElement = this.THIS();
1795            boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"otherEnd.type") instanceof HibernateEntity&&Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"otherEnd.list"))).booleanValue())).booleanValue()?OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"otherEnd.collectionIndexName")):true));
1796            if (!constraintValid)
1797            {
1798                validationMessages.add(
1799                    new ModelValidationMessage(
1800                        (MetafacadeBase)contextElement ,
1801                        "org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::ordered collections must have an index defined",
1802                        "Ordered collections (i.e. lists) must have an index defined.  You can define this with either the associationEndCollectionIndexName (to apply to all ordered collections in your model(s)), or andromda_hibernate_collection_index\nto apply to a single ordered collection."));
1803            }
1804        }
1805        catch (Throwable th)
1806        {
1807            Throwable cause = th.getCause();
1808            int depth = 0; // Some throwables have infinite recursion
1809            while (cause != null && depth < 7)
1810            {
1811                th = cause;
1812                depth++;
1813            }
1814            logger.error("Error validating constraint 'org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::ordered collections must have an index defined' ON "
1815                + this.THIS().toString() + ": " + th.getMessage(), th);
1816        }
1817        try
1818        {
1819            final Object contextElement = this.THIS();
1820            boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"otherEnd.type") instanceof HibernateEntity&&Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"otherEnd.map"))).booleanValue())).booleanValue()?(OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"otherEnd.collectionIndexType"))&&OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"otherEnd.collectionIndexName"))):true));
1821            if (!constraintValid)
1822            {
1823                validationMessages.add(
1824                    new ModelValidationMessage(
1825                        (MetafacadeBase)contextElement ,
1826                        "org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::map collecions must have the index type defined.",
1827                        "Collections defined as maps must have an index and index type defined., you can define each with the associationEndCollectionIndexName and associationEndCollectionIndexType (to apply to all mapped collections in your model(s)), or andromda_hibernate_collection_index and andromda_hibernate_collection_index_type\nto apply to a single ordered collection."));
1828            }
1829        }
1830        catch (Throwable th)
1831        {
1832            Throwable cause = th.getCause();
1833            int depth = 0; // Some throwables have infinite recursion
1834            while (cause != null && depth < 7)
1835            {
1836                th = cause;
1837                depth++;
1838            }
1839            logger.error("Error validating constraint 'org::andromda::cartridges::hibernate::metafacades::HibernateAssociationEnd::map collecions must have the index type defined.' ON "
1840                + this.THIS().toString() + ": " + th.getMessage(), th);
1841        }
1842    }
1843
1844    /**
1845     * The property that stores the name of the metafacade.
1846     */
1847    private static final String NAME_PROPERTY = "name";
1848    private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1849
1850    /**
1851     * @see Object#toString()
1852     */
1853    @Override
1854    public String toString()
1855    {
1856        final StringBuilder toString = new StringBuilder(this.getClass().getName());
1857        toString.append("[");
1858        try
1859        {
1860            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1861        }
1862        catch (final Throwable tryAgain)
1863        {
1864            try
1865            {
1866                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1867            }
1868            catch (final Throwable ignore)
1869            {
1870                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
1871            }
1872        }
1873        toString.append("]");
1874        return toString.toString();
1875    }
1876}