View Javadoc

1   //
2   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
3   //
4   package org.andromda.metafacades.uml14;
5   
6   /***
7    * MetafacadeLogic for org.andromda.metafacades.uml.Entity
8    *
9    * @see org.andromda.metafacades.uml.Entity
10   */
11  public abstract class EntityLogic
12      extends org.andromda.metafacades.uml14.ClassifierFacadeLogicImpl
13      implements org.andromda.metafacades.uml.Entity
14  {
15  
16      protected Object metaObject;
17  
18      public EntityLogic(Object metaObject, String context)
19      {
20          super((org.omg.uml.foundation.core.Classifier)metaObject, getContext(context));
21          this.metaObject = metaObject;
22      }
23  
24      /***
25       * Gets the context for this metafacade logic instance.
26       */
27      private static String getContext(String context)
28      {
29          if (context == null)
30          {
31              context = "org.andromda.metafacades.uml.Entity";
32          }
33          return context;
34      }
35  
36      /***
37       * @see org.andromda.core.metafacade.MetafacadeBase
38       */
39      public void resetMetafacadeContext(String context)
40      {
41          if (!this.contextRoot) // reset context only for non-root metafacades
42          {
43              context = getContext(context);  // to have same value as in original constructor call
44              setMetafacadeContext (context);
45          }
46      }
47  
48      /***
49       * @see org.andromda.metafacades.uml.Entity
50       */
51      public boolean isEntityMetaType()
52      {
53          return true;
54      }
55      
56      // --------------- attributes ---------------------
57  
58     /***
59      * @see org.andromda.metafacades.uml.Entity#getTableName()
60      */
61      protected abstract java.lang.String handleGetTableName();
62  
63      private void handleGetTableName1aPreCondition()
64      {
65      }
66  
67      private void handleGetTableName1aPostCondition()
68      {
69      }
70  
71      private java.lang.String __tableName1a;
72      private boolean __tableName1aSet = false;
73  
74      public final java.lang.String getTableName()
75      {
76          java.lang.String tableName1a = this.__tableName1a;
77          if (!this.__tableName1aSet)
78          {
79              handleGetTableName1aPreCondition();
80              tableName1a = handleGetTableName();
81              handleGetTableName1aPostCondition();
82              this.__tableName1a = tableName1a;
83              if (isMetafacadePropertyCachingEnabled())
84              {
85                  this.__tableName1aSet = true;
86              }
87          }
88          return tableName1a;
89      }
90  
91     /***
92      * @see org.andromda.metafacades.uml.Entity#isIdentifiersPresent()
93      */
94      protected abstract boolean handleIsIdentifiersPresent();
95  
96      private void handleIsIdentifiersPresent2aPreCondition()
97      {
98      }
99  
100     private void handleIsIdentifiersPresent2aPostCondition()
101     {
102     }
103 
104     public final boolean isIdentifiersPresent()
105     {
106         boolean identifiersPresent2a = false;
107         handleIsIdentifiersPresent2aPreCondition();
108         identifiersPresent2a = handleIsIdentifiersPresent();
109         handleIsIdentifiersPresent2aPostCondition();
110         return identifiersPresent2a;
111     }
112 
113    /***
114     * @see org.andromda.metafacades.uml.Entity#getMaxSqlNameLength()
115     */
116     protected abstract java.lang.Short handleGetMaxSqlNameLength();
117 
118     private void handleGetMaxSqlNameLength3aPreCondition()
119     {
120     }
121 
122     private void handleGetMaxSqlNameLength3aPostCondition()
123     {
124     }
125 
126     private java.lang.Short __maxSqlNameLength3a;
127     private boolean __maxSqlNameLength3aSet = false;
128 
129     public final java.lang.Short getMaxSqlNameLength()
130     {
131         java.lang.Short maxSqlNameLength3a = this.__maxSqlNameLength3a;
132         if (!this.__maxSqlNameLength3aSet)
133         {
134             handleGetMaxSqlNameLength3aPreCondition();
135             maxSqlNameLength3a = handleGetMaxSqlNameLength();
136             handleGetMaxSqlNameLength3aPostCondition();
137             this.__maxSqlNameLength3a = maxSqlNameLength3a;
138             if (isMetafacadePropertyCachingEnabled())
139             {
140                 this.__maxSqlNameLength3aSet = true;
141             }
142         }
143         return maxSqlNameLength3a;
144     }
145 
146    /***
147     * @see org.andromda.metafacades.uml.Entity#isChild()
148     */
149     protected abstract boolean handleIsChild();
150 
151     private void handleIsChild4aPreCondition()
152     {
153     }
154 
155     private void handleIsChild4aPostCondition()
156     {
157     }
158 
159     private boolean __child4a;
160     private boolean __child4aSet = false;
161 
162     public final boolean isChild()
163     {
164         boolean child4a = this.__child4a;
165         if (!this.__child4aSet)
166         {
167             handleIsChild4aPreCondition();
168             child4a = handleIsChild();
169             handleIsChild4aPostCondition();
170             this.__child4a = child4a;
171             if (isMetafacadePropertyCachingEnabled())
172             {
173                 this.__child4aSet = true;
174             }
175         }
176         return child4a;
177     }
178 
179    /***
180     * @see org.andromda.metafacades.uml.Entity#isUsingForeignIdentifier()
181     */
182     protected abstract boolean handleIsUsingForeignIdentifier();
183 
184     private void handleIsUsingForeignIdentifier5aPreCondition()
185     {
186     }
187 
188     private void handleIsUsingForeignIdentifier5aPostCondition()
189     {
190     }
191 
192     public final boolean isUsingForeignIdentifier()
193     {
194         boolean usingForeignIdentifier5a = false;
195         handleIsUsingForeignIdentifier5aPreCondition();
196         usingForeignIdentifier5a = handleIsUsingForeignIdentifier();
197         handleIsUsingForeignIdentifier5aPostCondition();
198         return usingForeignIdentifier5a;
199     }
200 
201    /***
202     * @see org.andromda.metafacades.uml.Entity#isDynamicIdentifiersPresent()
203     */
204     protected abstract boolean handleIsDynamicIdentifiersPresent();
205 
206     private void handleIsDynamicIdentifiersPresent6aPreCondition()
207     {
208     }
209 
210     private void handleIsDynamicIdentifiersPresent6aPostCondition()
211     {
212     }
213 
214     public final boolean isDynamicIdentifiersPresent()
215     {
216         boolean dynamicIdentifiersPresent6a = false;
217         handleIsDynamicIdentifiersPresent6aPreCondition();
218         dynamicIdentifiersPresent6a = handleIsDynamicIdentifiersPresent();
219         handleIsDynamicIdentifiersPresent6aPostCondition();
220         return dynamicIdentifiersPresent6a;
221     }
222 
223    /***
224     * @see org.andromda.metafacades.uml.Entity#isUsingAssignedIdentifier()
225     */
226     protected abstract boolean handleIsUsingAssignedIdentifier();
227 
228     private void handleIsUsingAssignedIdentifier7aPreCondition()
229     {
230     }
231 
232     private void handleIsUsingAssignedIdentifier7aPostCondition()
233     {
234     }
235 
236     public final boolean isUsingAssignedIdentifier()
237     {
238         boolean usingAssignedIdentifier7a = false;
239         handleIsUsingAssignedIdentifier7aPreCondition();
240         usingAssignedIdentifier7a = handleIsUsingAssignedIdentifier();
241         handleIsUsingAssignedIdentifier7aPostCondition();
242         return usingAssignedIdentifier7a;
243     }
244 
245    /***
246     * @see org.andromda.metafacades.uml.Entity#getSchema()
247     */
248     protected abstract java.lang.String handleGetSchema();
249 
250     private void handleGetSchema8aPreCondition()
251     {
252     }
253 
254     private void handleGetSchema8aPostCondition()
255     {
256     }
257 
258     private java.lang.String __schema8a;
259     private boolean __schema8aSet = false;
260 
261     public final java.lang.String getSchema()
262     {
263         java.lang.String schema8a = this.__schema8a;
264         if (!this.__schema8aSet)
265         {
266             handleGetSchema8aPreCondition();
267             schema8a = handleGetSchema();
268             handleGetSchema8aPostCondition();
269             this.__schema8a = schema8a;
270             if (isMetafacadePropertyCachingEnabled())
271             {
272                 this.__schema8aSet = true;
273             }
274         }
275         return schema8a;
276     }
277 
278    /***
279     * @see org.andromda.metafacades.uml.Entity#isCompositeIdentifier()
280     */
281     protected abstract boolean handleIsCompositeIdentifier();
282 
283     private void handleIsCompositeIdentifier9aPreCondition()
284     {
285     }
286 
287     private void handleIsCompositeIdentifier9aPostCondition()
288     {
289     }
290 
291     public final boolean isCompositeIdentifier()
292     {
293         boolean compositeIdentifier9a = false;
294         handleIsCompositeIdentifier9aPreCondition();
295         compositeIdentifier9a = handleIsCompositeIdentifier();
296         handleIsCompositeIdentifier9aPostCondition();
297         return compositeIdentifier9a;
298     }
299 
300     // ---------------- business methods ----------------------
301 
302     protected abstract java.lang.String handleGetOperationCallFromAttributes(boolean withIdentifiers);
303 
304     private void handleGetOperationCallFromAttributes1oPreCondition()
305     {
306     }
307 
308     private void handleGetOperationCallFromAttributes1oPostCondition()
309     {
310     }
311 
312     public java.lang.String getOperationCallFromAttributes(boolean withIdentifiers)
313     {
314         handleGetOperationCallFromAttributes1oPreCondition();
315         java.lang.String returnValue = handleGetOperationCallFromAttributes(withIdentifiers);
316         handleGetOperationCallFromAttributes1oPostCondition();
317         return returnValue;
318     }
319 
320     protected abstract java.util.Collection handleGetIdentifiers(boolean follow);
321 
322     private void handleGetIdentifiers2oPreCondition()
323     {
324     }
325 
326     private void handleGetIdentifiers2oPostCondition()
327     {
328     }
329 
330     public java.util.Collection getIdentifiers(boolean follow)
331     {
332         handleGetIdentifiers2oPreCondition();
333         java.util.Collection returnValue = handleGetIdentifiers(follow);
334         handleGetIdentifiers2oPostCondition();
335         return returnValue;
336     }
337 
338     protected abstract java.lang.String handleGetOperationCallFromAttributes(boolean withIdentifiers, boolean follow);
339 
340     private void handleGetOperationCallFromAttributes3oPreCondition()
341     {
342     }
343 
344     private void handleGetOperationCallFromAttributes3oPostCondition()
345     {
346     }
347 
348     public java.lang.String getOperationCallFromAttributes(boolean withIdentifiers, boolean follow)
349     {
350         handleGetOperationCallFromAttributes3oPreCondition();
351         java.lang.String returnValue = handleGetOperationCallFromAttributes(withIdentifiers, follow);
352         handleGetOperationCallFromAttributes3oPostCondition();
353         return returnValue;
354     }
355 
356     protected abstract java.util.Collection handleGetRequiredAttributes(boolean follow, boolean withIdentifiers);
357 
358     private void handleGetRequiredAttributes4oPreCondition()
359     {
360     }
361 
362     private void handleGetRequiredAttributes4oPostCondition()
363     {
364     }
365 
366     public java.util.Collection getRequiredAttributes(boolean follow, boolean withIdentifiers)
367     {
368         handleGetRequiredAttributes4oPreCondition();
369         java.util.Collection returnValue = handleGetRequiredAttributes(follow, withIdentifiers);
370         handleGetRequiredAttributes4oPostCondition();
371         return returnValue;
372     }
373 
374     protected abstract java.util.Collection handleGetRequiredProperties(boolean follow, boolean withIdentifiers);
375 
376     private void handleGetRequiredProperties5oPreCondition()
377     {
378     }
379 
380     private void handleGetRequiredProperties5oPostCondition()
381     {
382     }
383 
384     public java.util.Collection getRequiredProperties(boolean follow, boolean withIdentifiers)
385     {
386         handleGetRequiredProperties5oPreCondition();
387         java.util.Collection returnValue = handleGetRequiredProperties(follow, withIdentifiers);
388         handleGetRequiredProperties5oPostCondition();
389         return returnValue;
390     }
391 
392     protected abstract java.util.Collection handleGetAttributes(boolean follow, boolean withIdentifiers);
393 
394     private void handleGetAttributes6oPreCondition()
395     {
396     }
397 
398     private void handleGetAttributes6oPostCondition()
399     {
400     }
401 
402     public java.util.Collection getAttributes(boolean follow, boolean withIdentifiers)
403     {
404         handleGetAttributes6oPreCondition();
405         java.util.Collection returnValue = handleGetAttributes(follow, withIdentifiers);
406         handleGetAttributes6oPostCondition();
407         return returnValue;
408     }
409 
410     protected abstract java.lang.String handleGetAttributeTypeList(boolean follow, boolean withIdentifiers);
411 
412     private void handleGetAttributeTypeList7oPreCondition()
413     {
414     }
415 
416     private void handleGetAttributeTypeList7oPostCondition()
417     {
418     }
419 
420     public java.lang.String getAttributeTypeList(boolean follow, boolean withIdentifiers)
421     {
422         handleGetAttributeTypeList7oPreCondition();
423         java.lang.String returnValue = handleGetAttributeTypeList(follow, withIdentifiers);
424         handleGetAttributeTypeList7oPostCondition();
425         return returnValue;
426     }
427 
428     protected abstract java.lang.String handleGetAttributeNameList(boolean follow, boolean withIdentifiers);
429 
430     private void handleGetAttributeNameList8oPreCondition()
431     {
432     }
433 
434     private void handleGetAttributeNameList8oPostCondition()
435     {
436     }
437 
438     public java.lang.String getAttributeNameList(boolean follow, boolean withIdentifiers)
439     {
440         handleGetAttributeNameList8oPreCondition();
441         java.lang.String returnValue = handleGetAttributeNameList(follow, withIdentifiers);
442         handleGetAttributeNameList8oPostCondition();
443         return returnValue;
444     }
445 
446     protected abstract java.lang.String handleGetRequiredAttributeTypeList(boolean follow, boolean withIdentifiers);
447 
448     private void handleGetRequiredAttributeTypeList9oPreCondition()
449     {
450     }
451 
452     private void handleGetRequiredAttributeTypeList9oPostCondition()
453     {
454     }
455 
456     public java.lang.String getRequiredAttributeTypeList(boolean follow, boolean withIdentifiers)
457     {
458         handleGetRequiredAttributeTypeList9oPreCondition();
459         java.lang.String returnValue = handleGetRequiredAttributeTypeList(follow, withIdentifiers);
460         handleGetRequiredAttributeTypeList9oPostCondition();
461         return returnValue;
462     }
463 
464     protected abstract java.lang.String handleGetRequiredAttributeNameList(boolean follow, boolean withIdentifiers);
465 
466     private void handleGetRequiredAttributeNameList10oPreCondition()
467     {
468     }
469 
470     private void handleGetRequiredAttributeNameList10oPostCondition()
471     {
472     }
473 
474     public java.lang.String getRequiredAttributeNameList(boolean follow, boolean withIdentifiers)
475     {
476         handleGetRequiredAttributeNameList10oPreCondition();
477         java.lang.String returnValue = handleGetRequiredAttributeNameList(follow, withIdentifiers);
478         handleGetRequiredAttributeNameList10oPostCondition();
479         return returnValue;
480     }
481 
482     protected abstract java.util.Collection handleGetQueryOperations(boolean follow);
483 
484     private void handleGetQueryOperations11oPreCondition()
485     {
486     }
487 
488     private void handleGetQueryOperations11oPostCondition()
489     {
490     }
491 
492     public java.util.Collection getQueryOperations(boolean follow)
493     {
494         handleGetQueryOperations11oPreCondition();
495         java.util.Collection returnValue = handleGetQueryOperations(follow);
496         handleGetQueryOperations11oPostCondition();
497         return returnValue;
498     }
499 
500     protected abstract java.lang.String handleGetRequiredPropertyNameList(boolean follow, boolean withIdentifiers);
501 
502     private void handleGetRequiredPropertyNameList12oPreCondition()
503     {
504     }
505 
506     private void handleGetRequiredPropertyNameList12oPostCondition()
507     {
508     }
509 
510     public java.lang.String getRequiredPropertyNameList(boolean follow, boolean withIdentifiers)
511     {
512         handleGetRequiredPropertyNameList12oPreCondition();
513         java.lang.String returnValue = handleGetRequiredPropertyNameList(follow, withIdentifiers);
514         handleGetRequiredPropertyNameList12oPostCondition();
515         return returnValue;
516     }
517 
518     protected abstract java.lang.String handleGetRequiredPropertyTypeList(boolean follow, boolean withIdentifiers);
519 
520     private void handleGetRequiredPropertyTypeList13oPreCondition()
521     {
522     }
523 
524     private void handleGetRequiredPropertyTypeList13oPostCondition()
525     {
526     }
527 
528     public java.lang.String getRequiredPropertyTypeList(boolean follow, boolean withIdentifiers)
529     {
530         handleGetRequiredPropertyTypeList13oPreCondition();
531         java.lang.String returnValue = handleGetRequiredPropertyTypeList(follow, withIdentifiers);
532         handleGetRequiredPropertyTypeList13oPostCondition();
533         return returnValue;
534     }
535 
536     protected abstract java.util.Collection handleGetProperties(boolean follow, boolean withIdentifiers);
537 
538     private void handleGetProperties14oPreCondition()
539     {
540     }
541 
542     private void handleGetProperties14oPostCondition()
543     {
544     }
545 
546     public java.util.Collection getProperties(boolean follow, boolean withIdentifiers)
547     {
548         handleGetProperties14oPreCondition();
549         java.util.Collection returnValue = handleGetProperties(follow, withIdentifiers);
550         handleGetProperties14oPostCondition();
551         return returnValue;
552     }
553 
554     protected abstract java.util.Collection handleGetIdentifierAssociationEnds();
555 
556     private void handleGetIdentifierAssociationEnds15oPreCondition()
557     {
558     }
559 
560     private void handleGetIdentifierAssociationEnds15oPostCondition()
561     {
562     }
563 
564     public java.util.Collection getIdentifierAssociationEnds()
565     {
566         handleGetIdentifierAssociationEnds15oPreCondition();
567         java.util.Collection returnValue = handleGetIdentifierAssociationEnds();
568         handleGetIdentifierAssociationEnds15oPostCondition();
569         return returnValue;
570     }
571 
572     // ------------- associations ------------------
573 
574     private void handleGetEntityReferences1rPreCondition()
575     {
576     }
577 
578     private void handleGetEntityReferences1rPostCondition()
579     {
580     }
581 
582     public final java.util.Collection getEntityReferences()
583     {
584         java.util.Collection getEntityReferences1r = null;
585         handleGetEntityReferences1rPreCondition();
586         Object result = this.shieldedElements(handleGetEntityReferences());
587         try
588         {
589             getEntityReferences1r = (java.util.Collection)result;
590         }
591         catch (ClassCastException ex)
592         {
593             // ignore since the metafacade shouldn't
594             // be set if its not of the correct type
595         }
596         handleGetEntityReferences1rPostCondition();
597         return getEntityReferences1r;
598     }
599 
600     protected abstract java.util.Collection handleGetEntityReferences();
601 
602     private void handleGetParentEnd2rPreCondition()
603     {
604     }
605 
606     private void handleGetParentEnd2rPostCondition()
607     {
608     }
609 
610     public final org.andromda.metafacades.uml.EntityAssociationEnd getParentEnd()
611     {
612         org.andromda.metafacades.uml.EntityAssociationEnd getParentEnd2r = null;
613         handleGetParentEnd2rPreCondition();
614         Object result = this.shieldedElement(handleGetParentEnd());
615         try
616         {
617             getParentEnd2r = (org.andromda.metafacades.uml.EntityAssociationEnd)result;
618         }
619         catch (ClassCastException ex)
620         {
621             // ignore since the metafacade shouldn't
622             // be set if its not of the correct type
623         }
624         handleGetParentEnd2rPostCondition();
625         return getParentEnd2r;
626     }
627 
628     protected abstract java.lang.Object handleGetParentEnd();
629 
630     private void handleGetChildEnds3rPreCondition()
631     {
632     }
633 
634     private void handleGetChildEnds3rPostCondition()
635     {
636     }
637 
638     public final java.util.Collection getChildEnds()
639     {
640         java.util.Collection getChildEnds3r = null;
641         handleGetChildEnds3rPreCondition();
642         Object result = this.shieldedElements(handleGetChildEnds());
643         try
644         {
645             getChildEnds3r = (java.util.Collection)result;
646         }
647         catch (ClassCastException ex)
648         {
649             // ignore since the metafacade shouldn't
650             // be set if its not of the correct type
651         }
652         handleGetChildEnds3rPostCondition();
653         return getChildEnds3r;
654     }
655 
656     protected abstract java.util.Collection handleGetChildEnds();
657 
658     private void handleGetQueryOperations4rPreCondition()
659     {
660     }
661 
662     private void handleGetQueryOperations4rPostCondition()
663     {
664     }
665 
666     public final java.util.Collection getQueryOperations()
667     {
668         java.util.Collection getQueryOperations4r = null;
669         handleGetQueryOperations4rPreCondition();
670         Object result = this.shieldedElements(handleGetQueryOperations());
671         try
672         {
673             getQueryOperations4r = (java.util.Collection)result;
674         }
675         catch (ClassCastException ex)
676         {
677             // ignore since the metafacade shouldn't
678             // be set if its not of the correct type
679         }
680         handleGetQueryOperations4rPostCondition();
681         return getQueryOperations4r;
682     }
683 
684     protected abstract java.util.Collection handleGetQueryOperations();
685 
686     private void handleGetBusinessOperations5rPreCondition()
687     {
688     }
689 
690     private void handleGetBusinessOperations5rPostCondition()
691     {
692     }
693 
694     public final java.util.Collection getBusinessOperations()
695     {
696         java.util.Collection getBusinessOperations5r = null;
697         handleGetBusinessOperations5rPreCondition();
698         Object result = this.shieldedElements(handleGetBusinessOperations());
699         try
700         {
701             getBusinessOperations5r = (java.util.Collection)result;
702         }
703         catch (ClassCastException ex)
704         {
705             // ignore since the metafacade shouldn't
706             // be set if its not of the correct type
707         }
708         handleGetBusinessOperations5rPostCondition();
709         return getBusinessOperations5r;
710     }
711 
712     protected abstract java.util.Collection handleGetBusinessOperations();
713 
714     private void handleGetIdentifiers6rPreCondition()
715     {
716     }
717 
718     private void handleGetIdentifiers6rPostCondition()
719     {
720     }
721 
722     public final java.util.Collection getIdentifiers()
723     {
724         java.util.Collection getIdentifiers6r = null;
725         handleGetIdentifiers6rPreCondition();
726         Object result = this.shieldedElements(handleGetIdentifiers());
727         try
728         {
729             getIdentifiers6r = (java.util.Collection)result;
730         }
731         catch (ClassCastException ex)
732         {
733             // ignore since the metafacade shouldn't
734             // be set if its not of the correct type
735         }
736         handleGetIdentifiers6rPostCondition();
737         return getIdentifiers6r;
738     }
739 
740     protected abstract java.util.Collection handleGetIdentifiers();
741 
742     /***
743      * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
744      */
745     public void validateInvariants(java.util.Collection validationMessages)
746     {
747         super.validateInvariants(validationMessages);
748         {
749             final java.lang.Object contextElement = this.THIS(); boolean constraintValid = org.andromda.translation.ocl.validation.OCLResultEnsurer.ensure(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"identifiersPresent")); 
750             if (!constraintValid)
751                 validationMessages.add(
752                     new org.andromda.core.metafacade.ModelValidationMessage(
753                         (org.andromda.core.metafacade.MetafacadeBase)contextElement ,
754                         "org::andromda::metafacades::uml::Entity::entity must have at least one primary key",
755                         "Each entity must have at least one identifier defined."));
756         }
757         {
758             final java.lang.Object contextElement = this.THIS(); boolean constraintValid = org.andromda.translation.ocl.validation.OCLResultEnsurer.ensure(org.andromda.translation.ocl.validation.OCLCollections.forAll(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"attributes"),new org.apache.commons.collections.Predicate(){public boolean evaluate(java.lang.Object object){return Boolean.valueOf(String.valueOf(org.andromda.translation.ocl.validation.OCLExpressions.equal(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(object,"visibility"),"public"))).booleanValue();}})); 
759             if (!constraintValid)
760                 validationMessages.add(
761                     new org.andromda.core.metafacade.ModelValidationMessage(
762                         (org.andromda.core.metafacade.MetafacadeBase)contextElement ,
763                         "org::andromda::metafacades::uml::Entity::entity must have all public attributes",
764                         "All attributes on an entity must have a public visibility."));
765         }
766         {
767             final java.lang.Object contextElement = this.THIS(); boolean constraintValid = org.andromda.translation.ocl.validation.OCLResultEnsurer.ensure(org.andromda.translation.ocl.validation.OCLCollections.forAll(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"associationEnds"),new org.apache.commons.collections.Predicate(){public boolean evaluate(java.lang.Object object){return Boolean.valueOf(String.valueOf((Boolean.valueOf(String.valueOf(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(object,"otherEnd.navigable"))).booleanValue()?org.andromda.translation.ocl.validation.OCLExpressions.equal(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(object,"otherEnd.visibility"),"public"):true))).booleanValue();}})); 
768             if (!constraintValid)
769                 validationMessages.add(
770                     new org.andromda.core.metafacade.ModelValidationMessage(
771                         (org.andromda.core.metafacade.MetafacadeBase)contextElement ,
772                         "org::andromda::metafacades::uml::Entity::entity must have public associations",
773                         "All navigable connecting association ends must have a public visibility."));
774         }
775         {
776             final java.lang.Object contextElement = this.THIS(); boolean constraintValid = org.andromda.translation.ocl.validation.OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(org.andromda.translation.ocl.validation.OCLCollections.notEmpty(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"generalization")))).booleanValue()?org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"generalization") instanceof org.andromda.metafacades.uml.Entity:true)); 
777             if (!constraintValid)
778                 validationMessages.add(
779                     new org.andromda.core.metafacade.ModelValidationMessage(
780                         (org.andromda.core.metafacade.MetafacadeBase)contextElement ,
781                         "org::andromda::metafacades::uml::Entity::entities can only generalize other entities",
782                         "An entity can only generalize another entity."));
783         }
784         {
785             final java.lang.Object contextElement = this.THIS(); boolean constraintValid = org.andromda.translation.ocl.validation.OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(org.andromda.translation.ocl.validation.OCLCollections.notEmpty(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"specializations")))).booleanValue()?org.andromda.translation.ocl.validation.OCLCollections.forAll(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"specializations"),new org.apache.commons.collections.Predicate(){public boolean evaluate(java.lang.Object object){return Boolean.valueOf(String.valueOf(object instanceof org.andromda.metafacades.uml.Entity)).booleanValue();}}):true)); 
786             if (!constraintValid)
787                 validationMessages.add(
788                     new org.andromda.core.metafacade.ModelValidationMessage(
789                         (org.andromda.core.metafacade.MetafacadeBase)contextElement ,
790                         "org::andromda::metafacades::uml::Entity::entities can only specialize other entites",
791                         "An entity can only specialize another entity."));
792         }
793     }
794     
795     /***
796      * The property that stores the name of the metafacade.
797      */
798     private static final String NAME_PROPERTY = "name";
799     
800     /***
801      * @see java.lang.Object#toString()
802      */
803     public String toString()
804     {
805         final StringBuffer toString = new StringBuffer(this.getClass().getName());
806         toString.append("[");
807         try
808         {
809             toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
810         }
811         catch (final Throwable throwable)
812         {
813             // - just ignore when the metafacade doesn't have a name property
814         }
815         toString.append("]");
816         return toString.toString();
817     }
818 }