1
2
3
4
5 package org.andromda.metafacades.uml14;
6
7 import java.util.Collection;
8 import java.util.List;
9 import org.andromda.core.metafacade.MetafacadeBase;
10 import org.andromda.core.metafacade.ModelValidationMessage;
11 import org.andromda.metafacades.uml.AssociationEndFacade;
12 import org.andromda.metafacades.uml.AttributeFacade;
13 import org.andromda.metafacades.uml.ClassifierFacade;
14 import org.andromda.metafacades.uml.ModelElementFacade;
15 import org.andromda.metafacades.uml.OperationFacade;
16 import org.andromda.translation.ocl.validation.OCLCollections;
17 import org.andromda.translation.ocl.validation.OCLIntrospector;
18 import org.andromda.translation.ocl.validation.OCLResultEnsurer;
19 import org.apache.commons.collections.Transformer;
20 import org.apache.log4j.Logger;
21 import org.omg.uml.foundation.core.Classifier;
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 public abstract class ClassifierFacadeLogic
37 extends GeneralizableElementFacadeLogicImpl
38 implements ClassifierFacade
39 {
40
41
42
43
44 protected Classifier metaObject;
45
46
47
48
49
50 protected ClassifierFacadeLogic(Classifier metaObjectIn, String context)
51 {
52 super(metaObjectIn, getContext(context));
53 this.metaObject = metaObjectIn;
54 }
55
56
57
58
59 private static final Logger logger = Logger.getLogger(ClassifierFacadeLogic.class);
60
61
62
63
64
65
66 private static String getContext(String context)
67 {
68 if (context == null)
69 {
70 context = "org.andromda.metafacades.uml.ClassifierFacade";
71 }
72 return context;
73 }
74
75
76
77
78 @Override
79 public void resetMetafacadeContext(String context)
80 {
81 if (!this.contextRoot)
82 {
83 context = getContext(context);
84 setMetafacadeContext (context);
85 }
86 }
87
88
89
90
91
92 public boolean isClassifierFacadeMetaType()
93 {
94 return true;
95 }
96
97
98
99
100
101
102
103 protected abstract boolean handleIsPrimitive();
104
105 private boolean __primitive1a;
106 private boolean __primitive1aSet = false;
107
108
109
110
111
112 public final boolean isPrimitive()
113 {
114 boolean primitive1a = this.__primitive1a;
115 if (!this.__primitive1aSet)
116 {
117
118 primitive1a = handleIsPrimitive();
119
120 this.__primitive1a = primitive1a;
121 if (isMetafacadePropertyCachingEnabled())
122 {
123 this.__primitive1aSet = true;
124 }
125 }
126 return primitive1a;
127 }
128
129
130
131
132
133 protected abstract String handleGetOperationCallFromAttributes();
134
135 private String __operationCallFromAttributes2a;
136 private boolean __operationCallFromAttributes2aSet = false;
137
138
139
140
141
142
143
144 public final String getOperationCallFromAttributes()
145 {
146 String operationCallFromAttributes2a = this.__operationCallFromAttributes2a;
147 if (!this.__operationCallFromAttributes2aSet)
148 {
149
150 operationCallFromAttributes2a = handleGetOperationCallFromAttributes();
151
152 this.__operationCallFromAttributes2a = operationCallFromAttributes2a;
153 if (isMetafacadePropertyCachingEnabled())
154 {
155 this.__operationCallFromAttributes2aSet = true;
156 }
157 }
158 return operationCallFromAttributes2a;
159 }
160
161
162
163
164
165 protected abstract boolean handleIsAbstract();
166
167 private boolean __abstract3a;
168 private boolean __abstract3aSet = false;
169
170
171
172
173
174 public final boolean isAbstract()
175 {
176 boolean abstract3a = this.__abstract3a;
177 if (!this.__abstract3aSet)
178 {
179
180 abstract3a = handleIsAbstract();
181
182 this.__abstract3a = abstract3a;
183 if (isMetafacadePropertyCachingEnabled())
184 {
185 this.__abstract3aSet = true;
186 }
187 }
188 return abstract3a;
189 }
190
191
192
193
194
195 protected abstract boolean handleIsDataType();
196
197 private boolean __dataType4a;
198 private boolean __dataType4aSet = false;
199
200
201
202
203
204
205
206 public final boolean isDataType()
207 {
208 boolean dataType4a = this.__dataType4a;
209 if (!this.__dataType4aSet)
210 {
211
212 dataType4a = handleIsDataType();
213
214 this.__dataType4a = dataType4a;
215 if (isMetafacadePropertyCachingEnabled())
216 {
217 this.__dataType4aSet = true;
218 }
219 }
220 return dataType4a;
221 }
222
223
224
225
226
227 protected abstract boolean handleIsArrayType();
228
229 private boolean __arrayType5a;
230 private boolean __arrayType5aSet = false;
231
232
233
234
235
236 public final boolean isArrayType()
237 {
238 boolean arrayType5a = this.__arrayType5a;
239 if (!this.__arrayType5aSet)
240 {
241
242 arrayType5a = handleIsArrayType();
243
244 this.__arrayType5a = arrayType5a;
245 if (isMetafacadePropertyCachingEnabled())
246 {
247 this.__arrayType5aSet = true;
248 }
249 }
250 return arrayType5a;
251 }
252
253
254
255
256
257 protected abstract boolean handleIsCollectionType();
258
259 private boolean __collectionType6a;
260 private boolean __collectionType6aSet = false;
261
262
263
264
265
266 public final boolean isCollectionType()
267 {
268 boolean collectionType6a = this.__collectionType6a;
269 if (!this.__collectionType6aSet)
270 {
271
272 collectionType6a = handleIsCollectionType();
273
274 this.__collectionType6a = collectionType6a;
275 if (isMetafacadePropertyCachingEnabled())
276 {
277 this.__collectionType6aSet = true;
278 }
279 }
280 return collectionType6a;
281 }
282
283
284
285
286
287 protected abstract String handleGetWrapperName();
288
289 private String __wrapperName7a;
290 private boolean __wrapperName7aSet = false;
291
292
293
294
295
296
297
298
299
300 public final String getWrapperName()
301 {
302 String wrapperName7a = this.__wrapperName7a;
303 if (!this.__wrapperName7aSet)
304 {
305
306 wrapperName7a = handleGetWrapperName();
307
308 this.__wrapperName7a = wrapperName7a;
309 if (isMetafacadePropertyCachingEnabled())
310 {
311 this.__wrapperName7aSet = true;
312 }
313 }
314 return wrapperName7a;
315 }
316
317
318
319
320
321 protected abstract boolean handleIsDateType();
322
323 private boolean __dateType8a;
324 private boolean __dateType8aSet = false;
325
326
327
328
329
330 public final boolean isDateType()
331 {
332 boolean dateType8a = this.__dateType8a;
333 if (!this.__dateType8aSet)
334 {
335
336 dateType8a = handleIsDateType();
337
338 this.__dateType8a = dateType8a;
339 if (isMetafacadePropertyCachingEnabled())
340 {
341 this.__dateType8aSet = true;
342 }
343 }
344 return dateType8a;
345 }
346
347
348
349
350
351 protected abstract boolean handleIsInterface();
352
353 private boolean __interface9a;
354 private boolean __interface9aSet = false;
355
356
357
358
359
360 public final boolean isInterface()
361 {
362 boolean interface9a = this.__interface9a;
363 if (!this.__interface9aSet)
364 {
365
366 interface9a = handleIsInterface();
367
368 this.__interface9a = interface9a;
369 if (isMetafacadePropertyCachingEnabled())
370 {
371 this.__interface9aSet = true;
372 }
373 }
374 return interface9a;
375 }
376
377
378
379
380
381 protected abstract String handleGetJavaNewString();
382
383 private String __javaNewString10a;
384 private boolean __javaNewString10aSet = false;
385
386
387
388
389
390
391 public final String getJavaNewString()
392 {
393 String javaNewString10a = this.__javaNewString10a;
394 if (!this.__javaNewString10aSet)
395 {
396
397 javaNewString10a = handleGetJavaNewString();
398
399 this.__javaNewString10a = javaNewString10a;
400 if (isMetafacadePropertyCachingEnabled())
401 {
402 this.__javaNewString10aSet = true;
403 }
404 }
405 return javaNewString10a;
406 }
407
408
409
410
411
412 protected abstract boolean handleIsListType();
413
414 private boolean __listType11a;
415 private boolean __listType11aSet = false;
416
417
418
419
420
421 public final boolean isListType()
422 {
423 boolean listType11a = this.__listType11a;
424 if (!this.__listType11aSet)
425 {
426
427 listType11a = handleIsListType();
428
429 this.__listType11a = listType11a;
430 if (isMetafacadePropertyCachingEnabled())
431 {
432 this.__listType11aSet = true;
433 }
434 }
435 return listType11a;
436 }
437
438
439
440
441
442 protected abstract boolean handleIsSetType();
443
444 private boolean __setType12a;
445 private boolean __setType12aSet = false;
446
447
448
449
450
451 public final boolean isSetType()
452 {
453 boolean setType12a = this.__setType12a;
454 if (!this.__setType12aSet)
455 {
456
457 setType12a = handleIsSetType();
458
459 this.__setType12a = setType12a;
460 if (isMetafacadePropertyCachingEnabled())
461 {
462 this.__setType12aSet = true;
463 }
464 }
465 return setType12a;
466 }
467
468
469
470
471
472 protected abstract boolean handleIsFileType();
473
474 private boolean __fileType13a;
475 private boolean __fileType13aSet = false;
476
477
478
479
480
481 public final boolean isFileType()
482 {
483 boolean fileType13a = this.__fileType13a;
484 if (!this.__fileType13aSet)
485 {
486
487 fileType13a = handleIsFileType();
488
489 this.__fileType13a = fileType13a;
490 if (isMetafacadePropertyCachingEnabled())
491 {
492 this.__fileType13aSet = true;
493 }
494 }
495 return fileType13a;
496 }
497
498
499
500
501
502 protected abstract boolean handleIsMapType();
503
504 private boolean __mapType14a;
505 private boolean __mapType14aSet = false;
506
507
508
509
510
511 public final boolean isMapType()
512 {
513 boolean mapType14a = this.__mapType14a;
514 if (!this.__mapType14aSet)
515 {
516
517 mapType14a = handleIsMapType();
518
519 this.__mapType14a = mapType14a;
520 if (isMetafacadePropertyCachingEnabled())
521 {
522 this.__mapType14aSet = true;
523 }
524 }
525 return mapType14a;
526 }
527
528
529
530
531
532 protected abstract boolean handleIsStringType();
533
534 private boolean __stringType15a;
535 private boolean __stringType15aSet = false;
536
537
538
539
540
541 public final boolean isStringType()
542 {
543 boolean stringType15a = this.__stringType15a;
544 if (!this.__stringType15aSet)
545 {
546
547 stringType15a = handleIsStringType();
548
549 this.__stringType15a = stringType15a;
550 if (isMetafacadePropertyCachingEnabled())
551 {
552 this.__stringType15aSet = true;
553 }
554 }
555 return stringType15a;
556 }
557
558
559
560
561
562 protected abstract boolean handleIsEnumeration();
563
564 private boolean __enumeration16a;
565 private boolean __enumeration16aSet = false;
566
567
568
569
570
571 public final boolean isEnumeration()
572 {
573 boolean enumeration16a = this.__enumeration16a;
574 if (!this.__enumeration16aSet)
575 {
576
577 enumeration16a = handleIsEnumeration();
578
579 this.__enumeration16a = enumeration16a;
580 if (isMetafacadePropertyCachingEnabled())
581 {
582 this.__enumeration16aSet = true;
583 }
584 }
585 return enumeration16a;
586 }
587
588
589
590
591
592 protected abstract String handleGetArrayName();
593
594 private String __arrayName17a;
595 private boolean __arrayName17aSet = false;
596
597
598
599
600
601 public final String getArrayName()
602 {
603 String arrayName17a = this.__arrayName17a;
604 if (!this.__arrayName17aSet)
605 {
606
607 arrayName17a = handleGetArrayName();
608
609 this.__arrayName17a = arrayName17a;
610 if (isMetafacadePropertyCachingEnabled())
611 {
612 this.__arrayName17aSet = true;
613 }
614 }
615 return arrayName17a;
616 }
617
618
619
620
621
622 protected abstract String handleGetFullyQualifiedArrayName();
623
624 private String __fullyQualifiedArrayName18a;
625 private boolean __fullyQualifiedArrayName18aSet = false;
626
627
628
629
630
631 public final String getFullyQualifiedArrayName()
632 {
633 String fullyQualifiedArrayName18a = this.__fullyQualifiedArrayName18a;
634 if (!this.__fullyQualifiedArrayName18aSet)
635 {
636
637 fullyQualifiedArrayName18a = handleGetFullyQualifiedArrayName();
638
639 this.__fullyQualifiedArrayName18a = fullyQualifiedArrayName18a;
640 if (isMetafacadePropertyCachingEnabled())
641 {
642 this.__fullyQualifiedArrayName18aSet = true;
643 }
644 }
645 return fullyQualifiedArrayName18a;
646 }
647
648
649
650
651
652 protected abstract long handleGetSerialVersionUID();
653
654 private long __serialVersionUID19a;
655 private boolean __serialVersionUID19aSet = false;
656
657
658
659
660
661 public final long getSerialVersionUID()
662 {
663 long serialVersionUID19a = this.__serialVersionUID19a;
664 if (!this.__serialVersionUID19aSet)
665 {
666
667 serialVersionUID19a = handleGetSerialVersionUID();
668
669 this.__serialVersionUID19a = serialVersionUID19a;
670 if (isMetafacadePropertyCachingEnabled())
671 {
672 this.__serialVersionUID19aSet = true;
673 }
674 }
675 return serialVersionUID19a;
676 }
677
678
679
680
681
682 protected abstract boolean handleIsBlobType();
683
684 private boolean __blobType20a;
685 private boolean __blobType20aSet = false;
686
687
688
689
690
691 public final boolean isBlobType()
692 {
693 boolean blobType20a = this.__blobType20a;
694 if (!this.__blobType20aSet)
695 {
696
697 blobType20a = handleIsBlobType();
698
699 this.__blobType20a = blobType20a;
700 if (isMetafacadePropertyCachingEnabled())
701 {
702 this.__blobType20aSet = true;
703 }
704 }
705 return blobType20a;
706 }
707
708
709
710
711
712 protected abstract boolean handleIsBooleanType();
713
714 private boolean __booleanType21a;
715 private boolean __booleanType21aSet = false;
716
717
718
719
720
721 public final boolean isBooleanType()
722 {
723 boolean booleanType21a = this.__booleanType21a;
724 if (!this.__booleanType21aSet)
725 {
726
727 booleanType21a = handleIsBooleanType();
728
729 this.__booleanType21a = booleanType21a;
730 if (isMetafacadePropertyCachingEnabled())
731 {
732 this.__booleanType21aSet = true;
733 }
734 }
735 return booleanType21a;
736 }
737
738
739
740
741
742 protected abstract boolean handleIsTimeType();
743
744 private boolean __timeType22a;
745 private boolean __timeType22aSet = false;
746
747
748
749
750
751 public final boolean isTimeType()
752 {
753 boolean timeType22a = this.__timeType22a;
754 if (!this.__timeType22aSet)
755 {
756
757 timeType22a = handleIsTimeType();
758
759 this.__timeType22a = timeType22a;
760 if (isMetafacadePropertyCachingEnabled())
761 {
762 this.__timeType22aSet = true;
763 }
764 }
765 return timeType22a;
766 }
767
768
769
770
771
772 protected abstract boolean handleIsLeaf();
773
774 private boolean __leaf23a;
775 private boolean __leaf23aSet = false;
776
777
778
779
780
781 public final boolean isLeaf()
782 {
783 boolean leaf23a = this.__leaf23a;
784 if (!this.__leaf23aSet)
785 {
786
787 leaf23a = handleIsLeaf();
788
789 this.__leaf23a = leaf23a;
790 if (isMetafacadePropertyCachingEnabled())
791 {
792 this.__leaf23aSet = true;
793 }
794 }
795 return leaf23a;
796 }
797
798
799
800
801
802 protected abstract String handleGetImplementedInterfaceList();
803
804 private String __implementedInterfaceList24a;
805 private boolean __implementedInterfaceList24aSet = false;
806
807
808
809
810
811 public final String getImplementedInterfaceList()
812 {
813 String implementedInterfaceList24a = this.__implementedInterfaceList24a;
814 if (!this.__implementedInterfaceList24aSet)
815 {
816
817 implementedInterfaceList24a = handleGetImplementedInterfaceList();
818
819 this.__implementedInterfaceList24a = implementedInterfaceList24a;
820 if (isMetafacadePropertyCachingEnabled())
821 {
822 this.__implementedInterfaceList24aSet = true;
823 }
824 }
825 return implementedInterfaceList24a;
826 }
827
828
829
830
831
832 protected abstract Collection<ModelElementFacade> handleGetRequiredConstructorParameters();
833
834 private Collection<ModelElementFacade> __requiredConstructorParameters25a;
835 private boolean __requiredConstructorParameters25aSet = false;
836
837
838
839
840
841
842 public final Collection<ModelElementFacade> getRequiredConstructorParameters()
843 {
844 Collection<ModelElementFacade> requiredConstructorParameters25a = this.__requiredConstructorParameters25a;
845 if (!this.__requiredConstructorParameters25aSet)
846 {
847
848 requiredConstructorParameters25a = handleGetRequiredConstructorParameters();
849
850 this.__requiredConstructorParameters25a = requiredConstructorParameters25a;
851 if (isMetafacadePropertyCachingEnabled())
852 {
853 this.__requiredConstructorParameters25aSet = true;
854 }
855 }
856 return requiredConstructorParameters25a;
857 }
858
859
860
861
862
863 protected abstract Collection<ModelElementFacade> handleGetAllRequiredConstructorParameters();
864
865 private Collection<ModelElementFacade> __allRequiredConstructorParameters26a;
866 private boolean __allRequiredConstructorParameters26aSet = false;
867
868
869
870
871
872
873 public final Collection<ModelElementFacade> getAllRequiredConstructorParameters()
874 {
875 Collection<ModelElementFacade> allRequiredConstructorParameters26a = this.__allRequiredConstructorParameters26a;
876 if (!this.__allRequiredConstructorParameters26aSet)
877 {
878
879 allRequiredConstructorParameters26a = handleGetAllRequiredConstructorParameters();
880
881 this.__allRequiredConstructorParameters26a = allRequiredConstructorParameters26a;
882 if (isMetafacadePropertyCachingEnabled())
883 {
884 this.__allRequiredConstructorParameters26aSet = true;
885 }
886 }
887 return allRequiredConstructorParameters26a;
888 }
889
890
891
892
893
894 protected abstract List<ModelElementFacade> handleGetProperties();
895
896 private List<ModelElementFacade> __properties27a;
897 private boolean __properties27aSet = false;
898
899
900
901
902
903
904 public final List<ModelElementFacade> getProperties()
905 {
906 List<ModelElementFacade> properties27a = this.__properties27a;
907 if (!this.__properties27aSet)
908 {
909
910 properties27a = handleGetProperties();
911
912 this.__properties27a = properties27a;
913 if (isMetafacadePropertyCachingEnabled())
914 {
915 this.__properties27aSet = true;
916 }
917 }
918 return properties27a;
919 }
920
921
922
923
924
925 protected abstract Collection<ModelElementFacade> handleGetAllProperties();
926
927 private Collection<ModelElementFacade> __allProperties28a;
928 private boolean __allProperties28aSet = false;
929
930
931
932
933
934
935 public final Collection<ModelElementFacade> getAllProperties()
936 {
937 Collection<ModelElementFacade> allProperties28a = this.__allProperties28a;
938 if (!this.__allProperties28aSet)
939 {
940
941 allProperties28a = handleGetAllProperties();
942
943 this.__allProperties28a = allProperties28a;
944 if (isMetafacadePropertyCachingEnabled())
945 {
946 this.__allProperties28aSet = true;
947 }
948 }
949 return allProperties28a;
950 }
951
952
953
954
955
956 protected abstract boolean handleIsAssociationClass();
957
958 private boolean __associationClass29a;
959 private boolean __associationClass29aSet = false;
960
961
962
963
964
965 public final boolean isAssociationClass()
966 {
967 boolean associationClass29a = this.__associationClass29a;
968 if (!this.__associationClass29aSet)
969 {
970
971 associationClass29a = handleIsAssociationClass();
972
973 this.__associationClass29a = associationClass29a;
974 if (isMetafacadePropertyCachingEnabled())
975 {
976 this.__associationClass29aSet = true;
977 }
978 }
979 return associationClass29a;
980 }
981
982
983
984
985
986 protected abstract boolean handleIsClobType();
987
988 private boolean __clobType30a;
989 private boolean __clobType30aSet = false;
990
991
992
993
994
995 public final boolean isClobType()
996 {
997 boolean clobType30a = this.__clobType30a;
998 if (!this.__clobType30aSet)
999 {
1000
1001 clobType30a = handleIsClobType();
1002
1003 this.__clobType30a = clobType30a;
1004 if (isMetafacadePropertyCachingEnabled())
1005 {
1006 this.__clobType30aSet = true;
1007 }
1008 }
1009 return clobType30a;
1010 }
1011
1012
1013
1014
1015
1016 protected abstract boolean handleIsEmbeddedValue();
1017
1018 private boolean __embeddedValue31a;
1019 private boolean __embeddedValue31aSet = false;
1020
1021
1022
1023
1024
1025 public final boolean isEmbeddedValue()
1026 {
1027 boolean embeddedValue31a = this.__embeddedValue31a;
1028 if (!this.__embeddedValue31aSet)
1029 {
1030
1031 embeddedValue31a = handleIsEmbeddedValue();
1032
1033 this.__embeddedValue31a = embeddedValue31a;
1034 if (isMetafacadePropertyCachingEnabled())
1035 {
1036 this.__embeddedValue31aSet = true;
1037 }
1038 }
1039 return embeddedValue31a;
1040 }
1041
1042
1043
1044
1045
1046 protected abstract boolean handleIsIntegerType();
1047
1048 private boolean __integerType32a;
1049 private boolean __integerType32aSet = false;
1050
1051
1052
1053
1054
1055 public final boolean isIntegerType()
1056 {
1057 boolean integerType32a = this.__integerType32a;
1058 if (!this.__integerType32aSet)
1059 {
1060
1061 integerType32a = handleIsIntegerType();
1062
1063 this.__integerType32a = integerType32a;
1064 if (isMetafacadePropertyCachingEnabled())
1065 {
1066 this.__integerType32aSet = true;
1067 }
1068 }
1069 return integerType32a;
1070 }
1071
1072
1073
1074
1075
1076 protected abstract boolean handleIsFloatType();
1077
1078 private boolean __floatType33a;
1079 private boolean __floatType33aSet = false;
1080
1081
1082
1083
1084
1085 public final boolean isFloatType()
1086 {
1087 boolean floatType33a = this.__floatType33a;
1088 if (!this.__floatType33aSet)
1089 {
1090
1091 floatType33a = handleIsFloatType();
1092
1093 this.__floatType33a = floatType33a;
1094 if (isMetafacadePropertyCachingEnabled())
1095 {
1096 this.__floatType33aSet = true;
1097 }
1098 }
1099 return floatType33a;
1100 }
1101
1102
1103
1104
1105
1106 protected abstract boolean handleIsLongType();
1107
1108 private boolean __longType34a;
1109 private boolean __longType34aSet = false;
1110
1111
1112
1113
1114
1115 public final boolean isLongType()
1116 {
1117 boolean longType34a = this.__longType34a;
1118 if (!this.__longType34aSet)
1119 {
1120
1121 longType34a = handleIsLongType();
1122
1123 this.__longType34a = longType34a;
1124 if (isMetafacadePropertyCachingEnabled())
1125 {
1126 this.__longType34aSet = true;
1127 }
1128 }
1129 return longType34a;
1130 }
1131
1132
1133
1134
1135
1136 protected abstract boolean handleIsDoubleType();
1137
1138 private boolean __doubleType35a;
1139 private boolean __doubleType35aSet = false;
1140
1141
1142
1143
1144
1145 public final boolean isDoubleType()
1146 {
1147 boolean doubleType35a = this.__doubleType35a;
1148 if (!this.__doubleType35aSet)
1149 {
1150
1151 doubleType35a = handleIsDoubleType();
1152
1153 this.__doubleType35a = doubleType35a;
1154 if (isMetafacadePropertyCachingEnabled())
1155 {
1156 this.__doubleType35aSet = true;
1157 }
1158 }
1159 return doubleType35a;
1160 }
1161
1162
1163
1164
1165
1166 protected abstract boolean handleIsWrappedPrimitive();
1167
1168 private boolean __wrappedPrimitive36a;
1169 private boolean __wrappedPrimitive36aSet = false;
1170
1171
1172
1173
1174
1175 public final boolean isWrappedPrimitive()
1176 {
1177 boolean wrappedPrimitive36a = this.__wrappedPrimitive36a;
1178 if (!this.__wrappedPrimitive36aSet)
1179 {
1180
1181 wrappedPrimitive36a = handleIsWrappedPrimitive();
1182
1183 this.__wrappedPrimitive36a = wrappedPrimitive36a;
1184 if (isMetafacadePropertyCachingEnabled())
1185 {
1186 this.__wrappedPrimitive36aSet = true;
1187 }
1188 }
1189 return wrappedPrimitive36a;
1190 }
1191
1192
1193
1194
1195
1196 protected abstract String handleGetJavaNullString();
1197
1198 private String __javaNullString37a;
1199 private boolean __javaNullString37aSet = false;
1200
1201
1202
1203
1204
1205
1206 public final String getJavaNullString()
1207 {
1208 String javaNullString37a = this.__javaNullString37a;
1209 if (!this.__javaNullString37aSet)
1210 {
1211
1212 javaNullString37a = handleGetJavaNullString();
1213
1214 this.__javaNullString37a = javaNullString37a;
1215 if (isMetafacadePropertyCachingEnabled())
1216 {
1217 this.__javaNullString37aSet = true;
1218 }
1219 }
1220 return javaNullString37a;
1221 }
1222
1223
1224
1225
1226
1227 protected abstract boolean handleIsCharacterType();
1228
1229 private boolean __characterType38a;
1230 private boolean __characterType38aSet = false;
1231
1232
1233
1234
1235
1236 public final boolean isCharacterType()
1237 {
1238 boolean characterType38a = this.__characterType38a;
1239 if (!this.__characterType38aSet)
1240 {
1241
1242 characterType38a = handleIsCharacterType();
1243
1244 this.__characterType38a = characterType38a;
1245 if (isMetafacadePropertyCachingEnabled())
1246 {
1247 this.__characterType38aSet = true;
1248 }
1249 }
1250 return characterType38a;
1251 }
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262 protected abstract List<AttributeFacade> handleGetAttributes(boolean follow);
1263
1264
1265
1266
1267
1268
1269
1270
1271 public List<AttributeFacade> getAttributes(boolean follow)
1272 {
1273
1274 List<AttributeFacade> returnValue = handleGetAttributes(follow);
1275
1276 return returnValue;
1277 }
1278
1279
1280
1281
1282
1283
1284
1285 protected abstract AttributeFacade handleFindAttribute(String name);
1286
1287
1288
1289
1290
1291
1292
1293
1294 public AttributeFacade findAttribute(String name)
1295 {
1296
1297 AttributeFacade returnValue = handleFindAttribute(name);
1298
1299 return returnValue;
1300 }
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310 protected abstract List handleGetProperties(boolean follow);
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321 public List getProperties(boolean follow)
1322 {
1323
1324 List returnValue = handleGetProperties(follow);
1325
1326 return returnValue;
1327 }
1328
1329
1330
1331
1332
1333
1334
1335
1336 protected abstract List<AssociationEndFacade> handleGetNavigableConnectingEnds(boolean follow);
1337
1338
1339
1340
1341
1342
1343
1344
1345 public List<AssociationEndFacade> getNavigableConnectingEnds(boolean follow)
1346 {
1347
1348 List<AssociationEndFacade> returnValue = handleGetNavigableConnectingEnds(follow);
1349
1350 return returnValue;
1351 }
1352
1353
1354
1355 private ClassifierFacade __getArray1r;
1356 private boolean __getArray1rSet = false;
1357
1358
1359
1360
1361
1362
1363
1364 public final ClassifierFacade getArray()
1365 {
1366 ClassifierFacade getArray1r = this.__getArray1r;
1367 if (!this.__getArray1rSet)
1368 {
1369
1370 Object result = handleGetArray();
1371 MetafacadeBase shieldedResult = this.shieldedElement(result);
1372 try
1373 {
1374 getArray1r = (ClassifierFacade)shieldedResult;
1375 }
1376 catch (ClassCastException ex)
1377 {
1378
1379 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getArray ClassifierFacade " + result + ": " + shieldedResult);
1380 }
1381
1382 this.__getArray1r = getArray1r;
1383 if (isMetafacadePropertyCachingEnabled())
1384 {
1385 this.__getArray1rSet = true;
1386 }
1387 }
1388 return getArray1r;
1389 }
1390
1391
1392
1393
1394
1395 protected abstract Object handleGetArray();
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413 public final List<OperationFacade> getInstanceOperations()
1414 {
1415 List<OperationFacade> getInstanceOperations2r = null;
1416
1417 List result = handleGetInstanceOperations();
1418 List shieldedResult = this.shieldedElements(result);
1419 try
1420 {
1421 getInstanceOperations2r = (List<OperationFacade>)shieldedResult;
1422 }
1423 catch (ClassCastException ex)
1424 {
1425
1426 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getInstanceOperations List<OperationFacade> " + result + ": " + shieldedResult);
1427 }
1428
1429 return getInstanceOperations2r;
1430 }
1431
1432
1433
1434
1435
1436 protected abstract List handleGetInstanceOperations();
1437
1438
1439
1440
1441
1442 public final List<OperationFacade> getOperations()
1443 {
1444 List<OperationFacade> getOperations3r = null;
1445
1446 List result = handleGetOperations();
1447 List shieldedResult = this.shieldedElements(result);
1448 try
1449 {
1450 getOperations3r = (List<OperationFacade>)shieldedResult;
1451 }
1452 catch (ClassCastException ex)
1453 {
1454
1455 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getOperations List<OperationFacade> " + result + ": " + shieldedResult);
1456 }
1457
1458 return getOperations3r;
1459 }
1460
1461
1462
1463
1464
1465 protected abstract List handleGetOperations();
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483 public final List<OperationFacade> getStaticOperations()
1484 {
1485 List<OperationFacade> getStaticOperations4r = null;
1486
1487 List result = handleGetStaticOperations();
1488 List shieldedResult = this.shieldedElements(result);
1489 try
1490 {
1491 getStaticOperations4r = (List<OperationFacade>)shieldedResult;
1492 }
1493 catch (ClassCastException ex)
1494 {
1495
1496 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getStaticOperations List<OperationFacade> " + result + ": " + shieldedResult);
1497 }
1498
1499 return getStaticOperations4r;
1500 }
1501
1502
1503
1504
1505
1506 protected abstract List handleGetStaticOperations();
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524 public final Collection<ClassifierFacade> getAbstractions()
1525 {
1526 Collection<ClassifierFacade> getAbstractions5r = null;
1527
1528 Collection result = handleGetAbstractions();
1529 List shieldedResult = this.shieldedElements(result);
1530 try
1531 {
1532 getAbstractions5r = (Collection<ClassifierFacade>)shieldedResult;
1533 }
1534 catch (ClassCastException ex)
1535 {
1536
1537 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getAbstractions Collection<ClassifierFacade> " + result + ": " + shieldedResult);
1538 }
1539
1540 return getAbstractions5r;
1541 }
1542
1543
1544
1545
1546
1547 protected abstract Collection handleGetAbstractions();
1548
1549
1550
1551
1552
1553 public final List<AttributeFacade> getAttributes()
1554 {
1555 List<AttributeFacade> getAttributes6r = null;
1556
1557 List result = handleGetAttributes();
1558 List shieldedResult = this.shieldedElements(result);
1559 try
1560 {
1561 getAttributes6r = (List<AttributeFacade>)shieldedResult;
1562 }
1563 catch (ClassCastException ex)
1564 {
1565
1566 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getAttributes List<AttributeFacade> " + result + ": " + shieldedResult);
1567 }
1568
1569 return getAttributes6r;
1570 }
1571
1572
1573
1574
1575
1576 protected abstract List handleGetAttributes();
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594 public final Collection<AttributeFacade> getStaticAttributes()
1595 {
1596 Collection<AttributeFacade> getStaticAttributes7r = null;
1597
1598 Collection result = handleGetStaticAttributes();
1599 List shieldedResult = this.shieldedElements(result);
1600 try
1601 {
1602 getStaticAttributes7r = (Collection<AttributeFacade>)shieldedResult;
1603 }
1604 catch (ClassCastException ex)
1605 {
1606
1607 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getStaticAttributes Collection<AttributeFacade> " + result + ": " + shieldedResult);
1608 }
1609
1610 return getStaticAttributes7r;
1611 }
1612
1613
1614
1615
1616
1617 protected abstract Collection handleGetStaticAttributes();
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635 public final Collection<AssociationEndFacade> getNavigableConnectingEnds()
1636 {
1637 Collection<AssociationEndFacade> getNavigableConnectingEnds8r = null;
1638
1639 Collection result = handleGetNavigableConnectingEnds();
1640 List shieldedResult = this.shieldedElements(result);
1641 try
1642 {
1643 getNavigableConnectingEnds8r = (Collection<AssociationEndFacade>)shieldedResult;
1644 }
1645 catch (ClassCastException ex)
1646 {
1647
1648 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getNavigableConnectingEnds Collection<AssociationEndFacade> " + result + ": " + shieldedResult);
1649 }
1650
1651 return getNavigableConnectingEnds8r;
1652 }
1653
1654
1655
1656
1657
1658 protected abstract Collection handleGetNavigableConnectingEnds();
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676 public final List<AssociationEndFacade> getAssociationEnds()
1677 {
1678 List<AssociationEndFacade> getAssociationEnds9r = null;
1679
1680 List result = handleGetAssociationEnds();
1681 List shieldedResult = this.shieldedElements(result);
1682 try
1683 {
1684 getAssociationEnds9r = (List<AssociationEndFacade>)shieldedResult;
1685 }
1686 catch (ClassCastException ex)
1687 {
1688
1689 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getAssociationEnds List<AssociationEndFacade> " + result + ": " + shieldedResult);
1690 }
1691
1692 return getAssociationEnds9r;
1693 }
1694
1695
1696
1697
1698
1699 protected abstract List handleGetAssociationEnds();
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717 public final Collection<AttributeFacade> getInstanceAttributes()
1718 {
1719 Collection<AttributeFacade> getInstanceAttributes10r = null;
1720
1721 Collection result = handleGetInstanceAttributes();
1722 List shieldedResult = this.shieldedElements(result);
1723 try
1724 {
1725 getInstanceAttributes10r = (Collection<AttributeFacade>)shieldedResult;
1726 }
1727 catch (ClassCastException ex)
1728 {
1729
1730 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getInstanceAttributes Collection<AttributeFacade> " + result + ": " + shieldedResult);
1731 }
1732
1733 return getInstanceAttributes10r;
1734 }
1735
1736
1737
1738
1739
1740 protected abstract Collection handleGetInstanceAttributes();
1741
1742 private ClassifierFacade __getNonArray11r;
1743 private boolean __getNonArray11rSet = false;
1744
1745
1746
1747
1748
1749
1750 public final ClassifierFacade getNonArray()
1751 {
1752 ClassifierFacade getNonArray11r = this.__getNonArray11r;
1753 if (!this.__getNonArray11rSet)
1754 {
1755
1756 Object result = handleGetNonArray();
1757 MetafacadeBase shieldedResult = this.shieldedElement(result);
1758 try
1759 {
1760 getNonArray11r = (ClassifierFacade)shieldedResult;
1761 }
1762 catch (ClassCastException ex)
1763 {
1764
1765 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getNonArray ClassifierFacade " + result + ": " + shieldedResult);
1766 }
1767
1768 this.__getNonArray11r = getNonArray11r;
1769 if (isMetafacadePropertyCachingEnabled())
1770 {
1771 this.__getNonArray11rSet = true;
1772 }
1773 }
1774 return getNonArray11r;
1775 }
1776
1777
1778
1779
1780
1781 protected abstract Object handleGetNonArray();
1782
1783
1784
1785
1786
1787
1788 public final Collection<ClassifierFacade> getAllAssociatedClasses()
1789 {
1790 Collection<ClassifierFacade> getAllAssociatedClasses12r = null;
1791
1792 Collection result = handleGetAllAssociatedClasses();
1793 List shieldedResult = this.shieldedElements(result);
1794 try
1795 {
1796 getAllAssociatedClasses12r = (Collection<ClassifierFacade>)shieldedResult;
1797 }
1798 catch (ClassCastException ex)
1799 {
1800
1801 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getAllAssociatedClasses Collection<ClassifierFacade> " + result + ": " + shieldedResult);
1802 }
1803
1804 return getAllAssociatedClasses12r;
1805 }
1806
1807
1808
1809
1810
1811 protected abstract Collection handleGetAllAssociatedClasses();
1812
1813
1814
1815
1816
1817
1818 public final Collection<ClassifierFacade> getAssociatedClasses()
1819 {
1820 Collection<ClassifierFacade> getAssociatedClasses13r = null;
1821
1822 Collection result = handleGetAssociatedClasses();
1823 List shieldedResult = this.shieldedElements(result);
1824 try
1825 {
1826 getAssociatedClasses13r = (Collection<ClassifierFacade>)shieldedResult;
1827 }
1828 catch (ClassCastException ex)
1829 {
1830
1831 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getAssociatedClasses Collection<ClassifierFacade> " + result + ": " + shieldedResult);
1832 }
1833
1834 return getAssociatedClasses13r;
1835 }
1836
1837
1838
1839
1840
1841 protected abstract Collection handleGetAssociatedClasses();
1842
1843 private Collection<ClassifierFacade> __getInterfaceAbstractions14r;
1844 private boolean __getInterfaceAbstractions14rSet = false;
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862 public final Collection<ClassifierFacade> getInterfaceAbstractions()
1863 {
1864 Collection<ClassifierFacade> getInterfaceAbstractions14r = this.__getInterfaceAbstractions14r;
1865 if (!this.__getInterfaceAbstractions14rSet)
1866 {
1867
1868 Collection result = handleGetInterfaceAbstractions();
1869 List shieldedResult = this.shieldedElements(result);
1870 try
1871 {
1872 getInterfaceAbstractions14r = (Collection<ClassifierFacade>)shieldedResult;
1873 }
1874 catch (ClassCastException ex)
1875 {
1876
1877 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getInterfaceAbstractions Collection<ClassifierFacade> " + result + ": " + shieldedResult);
1878 }
1879
1880 this.__getInterfaceAbstractions14r = getInterfaceAbstractions14r;
1881 if (isMetafacadePropertyCachingEnabled())
1882 {
1883 this.__getInterfaceAbstractions14rSet = true;
1884 }
1885 }
1886 return getInterfaceAbstractions14r;
1887 }
1888
1889
1890
1891
1892
1893 protected abstract Collection handleGetInterfaceAbstractions();
1894
1895 private ClassifierFacade __getSuperClass15r;
1896 private boolean __getSuperClass15rSet = false;
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914 public final ClassifierFacade getSuperClass()
1915 {
1916 ClassifierFacade getSuperClass15r = this.__getSuperClass15r;
1917 if (!this.__getSuperClass15rSet)
1918 {
1919
1920 Object result = handleGetSuperClass();
1921 MetafacadeBase shieldedResult = this.shieldedElement(result);
1922 try
1923 {
1924 getSuperClass15r = (ClassifierFacade)shieldedResult;
1925 }
1926 catch (ClassCastException ex)
1927 {
1928
1929 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getSuperClass ClassifierFacade " + result + ": " + shieldedResult);
1930 }
1931
1932 this.__getSuperClass15r = getSuperClass15r;
1933 if (isMetafacadePropertyCachingEnabled())
1934 {
1935 this.__getSuperClass15rSet = true;
1936 }
1937 }
1938 return getSuperClass15r;
1939 }
1940
1941
1942
1943
1944
1945 protected abstract Object handleGetSuperClass();
1946
1947 private Collection<OperationFacade> __getImplementationOperations16r;
1948 private boolean __getImplementationOperations16rSet = false;
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966 public final Collection<OperationFacade> getImplementationOperations()
1967 {
1968 Collection<OperationFacade> getImplementationOperations16r = this.__getImplementationOperations16r;
1969 if (!this.__getImplementationOperations16rSet)
1970 {
1971
1972 Collection result = handleGetImplementationOperations();
1973 List shieldedResult = this.shieldedElements(result);
1974 try
1975 {
1976 getImplementationOperations16r = (Collection<OperationFacade>)shieldedResult;
1977 }
1978 catch (ClassCastException ex)
1979 {
1980
1981 ClassifierFacadeLogic.logger.warn("incorrect metafacade cast for ClassifierFacadeLogic.getImplementationOperations Collection<OperationFacade> " + result + ": " + shieldedResult);
1982 }
1983
1984 this.__getImplementationOperations16r = getImplementationOperations16r;
1985 if (isMetafacadePropertyCachingEnabled())
1986 {
1987 this.__getImplementationOperations16rSet = true;
1988 }
1989 }
1990 return getImplementationOperations16r;
1991 }
1992
1993
1994
1995
1996
1997 protected abstract Collection handleGetImplementationOperations();
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018 @Override
2019 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
2020 {
2021 super.validateInvariants(validationMessages);
2022 try
2023 {
2024 final Object contextElement = this.THIS();
2025 boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"name")));
2026 if (!constraintValid)
2027 {
2028 validationMessages.add(
2029 new ModelValidationMessage(
2030 (MetafacadeBase)contextElement ,
2031 "org::andromda::metafacades::uml::ClassifierFacade::classifier must have a name",
2032 "Each classifier must have a non-empty name."));
2033 }
2034 }
2035 catch (Throwable th)
2036 {
2037 Throwable cause = th.getCause();
2038 int depth = 0;
2039 while (cause != null && depth < 7)
2040 {
2041 th = cause;
2042 depth++;
2043 }
2044 logger.error("Error validating constraint 'org::andromda::metafacades::uml::ClassifierFacade::classifier must have a name' ON "
2045 + this.THIS().toString() + ": " + th.getMessage(), th);
2046 }
2047 try
2048 {
2049 final Object contextElement = this.THIS();
2050 boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.isUnique(OCLIntrospector.invoke(contextElement,"attributes"),new Transformer(){public Object transform(Object object){return OCLIntrospector.invoke(object,"name");}}));
2051 if (!constraintValid)
2052 {
2053 validationMessages.add(
2054 new ModelValidationMessage(
2055 (MetafacadeBase)contextElement ,
2056 "org::andromda::metafacades::uml::ClassifierFacade::attribute names must be unique",
2057 "Each attribute on an element must have a unique name."));
2058 }
2059 }
2060 catch (Throwable th)
2061 {
2062 Throwable cause = th.getCause();
2063 int depth = 0;
2064 while (cause != null && depth < 7)
2065 {
2066 th = cause;
2067 depth++;
2068 }
2069 logger.error("Error validating constraint 'org::andromda::metafacades::uml::ClassifierFacade::attribute names must be unique' ON "
2070 + this.THIS().toString() + ": " + th.getMessage(), th);
2071 }
2072 try
2073 {
2074 final Object contextElement = this.THIS();
2075 boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.isUnique(OCLIntrospector.invoke(contextElement,"navigableConnectingEnds"),new Transformer(){public Object transform(Object object){return OCLIntrospector.invoke(object,"name");}}));
2076 if (!constraintValid)
2077 {
2078 validationMessages.add(
2079 new ModelValidationMessage(
2080 (MetafacadeBase)contextElement ,
2081 "org::andromda::metafacades::uml::ClassifierFacade::association end names must be unique",
2082 "The name of each navigable connecting association end must be unique."));
2083 }
2084 }
2085 catch (Throwable th)
2086 {
2087 Throwable cause = th.getCause();
2088 int depth = 0;
2089 while (cause != null && depth < 7)
2090 {
2091 th = cause;
2092 depth++;
2093 }
2094 logger.error("Error validating constraint 'org::andromda::metafacades::uml::ClassifierFacade::association end names must be unique' ON "
2095 + this.THIS().toString() + ": " + th.getMessage(), th);
2096 }
2097 try
2098 {
2099 final Object contextElement = this.THIS();
2100 boolean constraintValid = OCLResultEnsurer.ensure(OCLCollections.isUnique(OCLIntrospector.invoke(contextElement,"sourceDependencies"),new Transformer(){public Object transform(Object object){return OCLIntrospector.invoke(object,"name");}}));
2101 if (!constraintValid)
2102 {
2103 validationMessages.add(
2104 new ModelValidationMessage(
2105 (MetafacadeBase)contextElement ,
2106 "org::andromda::metafacades::uml::ClassifierFacade::source dependencies must be unique",
2107 "Each dependency going out a of an element must have a unique name."));
2108 }
2109 }
2110 catch (Throwable th)
2111 {
2112 Throwable cause = th.getCause();
2113 int depth = 0;
2114 while (cause != null && depth < 7)
2115 {
2116 th = cause;
2117 depth++;
2118 }
2119 logger.error("Error validating constraint 'org::andromda::metafacades::uml::ClassifierFacade::source dependencies must be unique' ON "
2120 + this.THIS().toString() + ": " + th.getMessage(), th);
2121 }
2122 }
2123 }