1
2
3
4
5 package org.andromda.cartridges.spring.metafacades;
6
7 import java.util.Collection;
8 import org.andromda.core.common.Introspector;
9 import org.andromda.core.metafacade.MetafacadeBase;
10 import org.andromda.core.metafacade.MetafacadeFactory;
11 import org.andromda.core.metafacade.ModelValidationMessage;
12 import org.andromda.metafacades.uml.AssociationEndFacade;
13 import org.andromda.metafacades.uml.AssociationFacade;
14 import org.andromda.metafacades.uml.ClassifierFacade;
15 import org.andromda.metafacades.uml.ConstraintFacade;
16 import org.andromda.metafacades.uml.DependencyFacade;
17 import org.andromda.metafacades.uml.EntityAttribute;
18 import org.andromda.metafacades.uml.ManageableEntityAssociationEnd;
19 import org.andromda.metafacades.uml.ModelElementFacade;
20 import org.andromda.metafacades.uml.ModelFacade;
21 import org.andromda.metafacades.uml.PackageFacade;
22 import org.andromda.metafacades.uml.StateMachineFacade;
23 import org.andromda.metafacades.uml.StereotypeFacade;
24 import org.andromda.metafacades.uml.TaggedValueFacade;
25 import org.andromda.metafacades.uml.TemplateParameterFacade;
26 import org.andromda.metafacades.uml.TypeMappings;
27
28
29
30
31
32
33
34
35 public abstract class SpringManageableEntityAssociationEndLogic
36 extends MetafacadeBase
37 implements SpringManageableEntityAssociationEnd
38 {
39
40
41
42
43 protected Object metaObject;
44
45
46
47
48
49 protected SpringManageableEntityAssociationEndLogic(Object metaObjectIn, String context)
50 {
51 super(metaObjectIn, getContext(context));
52 this.superManageableEntityAssociationEnd =
53 (ManageableEntityAssociationEnd)
54 MetafacadeFactory.getInstance().createFacadeImpl(
55 "org.andromda.metafacades.uml.ManageableEntityAssociationEnd",
56 metaObjectIn,
57 getContext(context));
58 this.metaObject = metaObjectIn;
59 }
60
61
62
63
64
65
66 private static String getContext(String context)
67 {
68 if (context == null)
69 {
70 context = "org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd";
71 }
72 return context;
73 }
74
75 private ManageableEntityAssociationEnd superManageableEntityAssociationEnd;
76 private boolean superManageableEntityAssociationEndInitialized = false;
77
78
79
80
81
82 private ManageableEntityAssociationEnd getSuperManageableEntityAssociationEnd()
83 {
84 if (!this.superManageableEntityAssociationEndInitialized)
85 {
86 ((MetafacadeBase)this.superManageableEntityAssociationEnd).setMetafacadeContext(this.getMetafacadeContext());
87 this.superManageableEntityAssociationEndInitialized = true;
88 }
89 return this.superManageableEntityAssociationEnd;
90 }
91
92
93
94
95
96 @Override
97 public void resetMetafacadeContext(String context)
98 {
99 if (!this.contextRoot)
100 {
101 context = getContext(context);
102 setMetafacadeContext (context);
103 if (this.superManageableEntityAssociationEndInitialized)
104 {
105 ((MetafacadeBase)this.superManageableEntityAssociationEnd).resetMetafacadeContext(context);
106 }
107 }
108 }
109
110
111
112
113
114 public boolean isSpringManageableEntityAssociationEndMetaType()
115 {
116 return true;
117 }
118
119
120
121
122
123
124
125 protected abstract String handleGetDaoGetterName();
126
127 private String __daoGetterName1a;
128 private boolean __daoGetterName1aSet = false;
129
130
131
132
133
134
135 public final String getDaoGetterName()
136 {
137 String daoGetterName1a = this.__daoGetterName1a;
138 if (!this.__daoGetterName1aSet)
139 {
140
141 daoGetterName1a = handleGetDaoGetterName();
142
143 this.__daoGetterName1a = daoGetterName1a;
144 if (isMetafacadePropertyCachingEnabled())
145 {
146 this.__daoGetterName1aSet = true;
147 }
148 }
149 return daoGetterName1a;
150 }
151
152
153
154
155
156 protected abstract String handleGetDaoSetterName();
157
158 private String __daoSetterName2a;
159 private boolean __daoSetterName2aSet = false;
160
161
162
163
164
165
166 public final String getDaoSetterName()
167 {
168 String daoSetterName2a = this.__daoSetterName2a;
169 if (!this.__daoSetterName2aSet)
170 {
171
172 daoSetterName2a = handleGetDaoSetterName();
173
174 this.__daoSetterName2a = daoSetterName2a;
175 if (isMetafacadePropertyCachingEnabled())
176 {
177 this.__daoSetterName2aSet = true;
178 }
179 }
180 return daoSetterName2a;
181 }
182
183
184
185
186
187 protected abstract String handleGetDaoName();
188
189 private String __daoName3a;
190 private boolean __daoName3aSet = false;
191
192
193
194
195
196
197 public final String getDaoName()
198 {
199 String daoName3a = this.__daoName3a;
200 if (!this.__daoName3aSet)
201 {
202
203 daoName3a = handleGetDaoName();
204
205 this.__daoName3a = daoName3a;
206 if (isMetafacadePropertyCachingEnabled())
207 {
208 this.__daoName3aSet = true;
209 }
210 }
211 return daoName3a;
212 }
213
214
215
216
217
218 protected abstract String handleGetDaoReferenceName();
219
220 private String __daoReferenceName4a;
221 private boolean __daoReferenceName4aSet = false;
222
223
224
225
226
227
228 public final String getDaoReferenceName()
229 {
230 String daoReferenceName4a = this.__daoReferenceName4a;
231 if (!this.__daoReferenceName4aSet)
232 {
233
234 daoReferenceName4a = handleGetDaoReferenceName();
235
236 this.__daoReferenceName4a = daoReferenceName4a;
237 if (isMetafacadePropertyCachingEnabled())
238 {
239 this.__daoReferenceName4aSet = true;
240 }
241 }
242 return daoReferenceName4a;
243 }
244
245
246
247
248
249 public boolean isManageableEntityAssociationEndMetaType()
250 {
251 return true;
252 }
253
254
255
256
257
258 public boolean isEntityAssociationEndMetaType()
259 {
260 return true;
261 }
262
263
264
265
266
267 public boolean isAssociationEndFacadeMetaType()
268 {
269 return true;
270 }
271
272
273
274
275
276 public boolean isModelElementFacadeMetaType()
277 {
278 return true;
279 }
280
281
282
283
284
285
286 public String getAdderName()
287 {
288 return this.getSuperManageableEntityAssociationEnd().getAdderName();
289 }
290
291
292
293
294
295
296
297 public String getAggregationKind()
298 {
299 return this.getSuperManageableEntityAssociationEnd().getAggregationKind();
300 }
301
302
303
304
305
306 public AssociationFacade getAssociation()
307 {
308 return this.getSuperManageableEntityAssociationEnd().getAssociation();
309 }
310
311
312
313
314
315
316
317
318 public String getDefault()
319 {
320 return this.getSuperManageableEntityAssociationEnd().getDefault();
321 }
322
323
324
325
326
327 public String getGetterName()
328 {
329 return this.getSuperManageableEntityAssociationEnd().getGetterName();
330 }
331
332
333
334
335
336
337 public String getGetterSetterTypeName()
338 {
339 return this.getSuperManageableEntityAssociationEnd().getGetterSetterTypeName();
340 }
341
342
343
344
345
346
347 public int getLower()
348 {
349 return this.getSuperManageableEntityAssociationEnd().getLower();
350 }
351
352
353
354
355
356 public AssociationEndFacade getOtherEnd()
357 {
358 return this.getSuperManageableEntityAssociationEnd().getOtherEnd();
359 }
360
361
362
363
364
365 public String getRemoverName()
366 {
367 return this.getSuperManageableEntityAssociationEnd().getRemoverName();
368 }
369
370
371
372
373
374 public String getSetterName()
375 {
376 return this.getSuperManageableEntityAssociationEnd().getSetterName();
377 }
378
379
380
381
382
383 public ClassifierFacade getType()
384 {
385 return this.getSuperManageableEntityAssociationEnd().getType();
386 }
387
388
389
390
391
392
393 public int getUpper()
394 {
395 return this.getSuperManageableEntityAssociationEnd().getUpper();
396 }
397
398
399
400
401
402 public boolean isAggregation()
403 {
404 return this.getSuperManageableEntityAssociationEnd().isAggregation();
405 }
406
407
408
409
410
411
412 public boolean isBidirectional()
413 {
414 return this.getSuperManageableEntityAssociationEnd().isBidirectional();
415 }
416
417
418
419
420
421
422 public boolean isChild()
423 {
424 return this.getSuperManageableEntityAssociationEnd().isChild();
425 }
426
427
428
429
430
431 public boolean isComposition()
432 {
433 return this.getSuperManageableEntityAssociationEnd().isComposition();
434 }
435
436
437
438
439
440
441 public boolean isDerived()
442 {
443 return this.getSuperManageableEntityAssociationEnd().isDerived();
444 }
445
446
447
448
449
450
451 public boolean isLeaf()
452 {
453 return this.getSuperManageableEntityAssociationEnd().isLeaf();
454 }
455
456
457
458
459
460 public boolean isMany()
461 {
462 return this.getSuperManageableEntityAssociationEnd().isMany();
463 }
464
465
466
467
468
469 public boolean isMany2Many()
470 {
471 return this.getSuperManageableEntityAssociationEnd().isMany2Many();
472 }
473
474
475
476
477
478 public boolean isMany2One()
479 {
480 return this.getSuperManageableEntityAssociationEnd().isMany2One();
481 }
482
483
484
485
486
487 public boolean isNavigable()
488 {
489 return this.getSuperManageableEntityAssociationEnd().isNavigable();
490 }
491
492
493
494
495
496 public boolean isOne2Many()
497 {
498 return this.getSuperManageableEntityAssociationEnd().isOne2Many();
499 }
500
501
502
503
504
505 public boolean isOne2One()
506 {
507 return this.getSuperManageableEntityAssociationEnd().isOne2One();
508 }
509
510
511
512
513
514
515 public boolean isOrdered()
516 {
517 return this.getSuperManageableEntityAssociationEnd().isOrdered();
518 }
519
520
521
522
523
524 public boolean isReadOnly()
525 {
526 return this.getSuperManageableEntityAssociationEnd().isReadOnly();
527 }
528
529
530
531
532
533 public boolean isRequired()
534 {
535 return this.getSuperManageableEntityAssociationEnd().isRequired();
536 }
537
538
539
540
541
542 public boolean isStatic()
543 {
544 return this.getSuperManageableEntityAssociationEnd().isStatic();
545 }
546
547
548
549
550
551
552 public boolean isUnique()
553 {
554 return this.getSuperManageableEntityAssociationEnd().isUnique();
555 }
556
557
558
559
560
561 public String getColumnIndex()
562 {
563 return this.getSuperManageableEntityAssociationEnd().getColumnIndex();
564 }
565
566
567
568
569
570 public String getColumnName()
571 {
572 return this.getSuperManageableEntityAssociationEnd().getColumnName();
573 }
574
575
576
577
578
579 public String getForeignKeyConstraintName()
580 {
581 return this.getSuperManageableEntityAssociationEnd().getForeignKeyConstraintName();
582 }
583
584
585
586
587
588 public String getForeignKeySuffix()
589 {
590 return this.getSuperManageableEntityAssociationEnd().getForeignKeySuffix();
591 }
592
593
594
595
596
597 public String getSqlType()
598 {
599 return this.getSuperManageableEntityAssociationEnd().getSqlType();
600 }
601
602
603
604
605
606 public String getUniqueGroup()
607 {
608 return this.getSuperManageableEntityAssociationEnd().getUniqueGroup();
609 }
610
611
612
613
614
615
616
617
618 public boolean isForeignIdentifier()
619 {
620 return this.getSuperManageableEntityAssociationEnd().isForeignIdentifier();
621 }
622
623
624
625
626
627 public boolean isIdentifier()
628 {
629 return this.getSuperManageableEntityAssociationEnd().isIdentifier();
630 }
631
632
633
634
635
636 public boolean isIdentifiersPresent()
637 {
638 return this.getSuperManageableEntityAssociationEnd().isIdentifiersPresent();
639 }
640
641
642
643
644
645 public boolean isTransient()
646 {
647 return this.getSuperManageableEntityAssociationEnd().isTransient();
648 }
649
650
651
652
653
654 public EntityAttribute getManageableIdentifier()
655 {
656 return this.getSuperManageableEntityAssociationEnd().getManageableIdentifier();
657 }
658
659
660
661
662
663 public boolean isDisplay()
664 {
665 return this.getSuperManageableEntityAssociationEnd().isDisplay();
666 }
667
668
669
670
671
672 public void copyTaggedValues(ModelElementFacade element)
673 {
674 this.getSuperManageableEntityAssociationEnd().copyTaggedValues(element);
675 }
676
677
678
679
680
681
682 public Object findTaggedValue(String tagName)
683 {
684 return this.getSuperManageableEntityAssociationEnd().findTaggedValue(tagName);
685 }
686
687
688
689
690
691
692 public Collection<Object> findTaggedValues(String tagName)
693 {
694 return this.getSuperManageableEntityAssociationEnd().findTaggedValues(tagName);
695 }
696
697
698
699
700
701
702
703 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
704 {
705 return this.getSuperManageableEntityAssociationEnd().getBindedFullyQualifiedName(bindedElement);
706 }
707
708
709
710
711
712 public Collection<ConstraintFacade> getConstraints()
713 {
714 return this.getSuperManageableEntityAssociationEnd().getConstraints();
715 }
716
717
718
719
720
721
722 public Collection<ConstraintFacade> getConstraints(String kind)
723 {
724 return this.getSuperManageableEntityAssociationEnd().getConstraints(kind);
725 }
726
727
728
729
730
731
732
733 public String getDocumentation(String indent)
734 {
735 return this.getSuperManageableEntityAssociationEnd().getDocumentation(indent);
736 }
737
738
739
740
741
742
743
744
745 public String getDocumentation(String indent, int lineLength)
746 {
747 return this.getSuperManageableEntityAssociationEnd().getDocumentation(indent, lineLength);
748 }
749
750
751
752
753
754
755
756 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
757 {
758 return this.getSuperManageableEntityAssociationEnd().getDocumentation(indent, lineLength, htmlStyle);
759 }
760
761
762
763
764
765 public String getFullyQualifiedName()
766 {
767 return this.getSuperManageableEntityAssociationEnd().getFullyQualifiedName();
768 }
769
770
771
772
773
774
775
776
777 public String getFullyQualifiedName(boolean modelName)
778 {
779 return this.getSuperManageableEntityAssociationEnd().getFullyQualifiedName(modelName);
780 }
781
782
783
784
785
786
787 public String getFullyQualifiedNamePath()
788 {
789 return this.getSuperManageableEntityAssociationEnd().getFullyQualifiedNamePath();
790 }
791
792
793
794
795
796 public String getId()
797 {
798 return this.getSuperManageableEntityAssociationEnd().getId();
799 }
800
801
802
803
804
805
806
807
808
809 public Collection<String> getKeywords()
810 {
811 return this.getSuperManageableEntityAssociationEnd().getKeywords();
812 }
813
814
815
816
817
818 public String getLabel()
819 {
820 return this.getSuperManageableEntityAssociationEnd().getLabel();
821 }
822
823
824
825
826
827 public TypeMappings getLanguageMappings()
828 {
829 return this.getSuperManageableEntityAssociationEnd().getLanguageMappings();
830 }
831
832
833
834
835
836
837 public ModelFacade getModel()
838 {
839 return this.getSuperManageableEntityAssociationEnd().getModel();
840 }
841
842
843
844
845
846 public String getName()
847 {
848 return this.getSuperManageableEntityAssociationEnd().getName();
849 }
850
851
852
853
854
855 public ModelElementFacade getPackage()
856 {
857 return this.getSuperManageableEntityAssociationEnd().getPackage();
858 }
859
860
861
862
863
864 public String getPackageName()
865 {
866 return this.getSuperManageableEntityAssociationEnd().getPackageName();
867 }
868
869
870
871
872
873
874 public String getPackageName(boolean modelName)
875 {
876 return this.getSuperManageableEntityAssociationEnd().getPackageName(modelName);
877 }
878
879
880
881
882
883 public String getPackagePath()
884 {
885 return this.getSuperManageableEntityAssociationEnd().getPackagePath();
886 }
887
888
889
890
891
892
893
894
895 public String getQualifiedName()
896 {
897 return this.getSuperManageableEntityAssociationEnd().getQualifiedName();
898 }
899
900
901
902
903
904 public PackageFacade getRootPackage()
905 {
906 return this.getSuperManageableEntityAssociationEnd().getRootPackage();
907 }
908
909
910
911
912
913 public Collection<DependencyFacade> getSourceDependencies()
914 {
915 return this.getSuperManageableEntityAssociationEnd().getSourceDependencies();
916 }
917
918
919
920
921
922
923 public StateMachineFacade getStateMachineContext()
924 {
925 return this.getSuperManageableEntityAssociationEnd().getStateMachineContext();
926 }
927
928
929
930
931
932 public Collection<String> getStereotypeNames()
933 {
934 return this.getSuperManageableEntityAssociationEnd().getStereotypeNames();
935 }
936
937
938
939
940
941 public Collection<StereotypeFacade> getStereotypes()
942 {
943 return this.getSuperManageableEntityAssociationEnd().getStereotypes();
944 }
945
946
947
948
949
950 public Collection<TaggedValueFacade> getTaggedValues()
951 {
952 return this.getSuperManageableEntityAssociationEnd().getTaggedValues();
953 }
954
955
956
957
958
959 public Collection<DependencyFacade> getTargetDependencies()
960 {
961 return this.getSuperManageableEntityAssociationEnd().getTargetDependencies();
962 }
963
964
965
966
967
968 public Object getTemplateParameter(String parameterName)
969 {
970 return this.getSuperManageableEntityAssociationEnd().getTemplateParameter(parameterName);
971 }
972
973
974
975
976
977 public Collection<TemplateParameterFacade> getTemplateParameters()
978 {
979 return this.getSuperManageableEntityAssociationEnd().getTemplateParameters();
980 }
981
982
983
984
985
986
987 public String getVisibility()
988 {
989 return this.getSuperManageableEntityAssociationEnd().getVisibility();
990 }
991
992
993
994
995
996
997 public boolean hasExactStereotype(String stereotypeName)
998 {
999 return this.getSuperManageableEntityAssociationEnd().hasExactStereotype(stereotypeName);
1000 }
1001
1002
1003
1004
1005
1006
1007 public boolean hasKeyword(String keywordName)
1008 {
1009 return this.getSuperManageableEntityAssociationEnd().hasKeyword(keywordName);
1010 }
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024 public boolean hasStereotype(String stereotypeName)
1025 {
1026 return this.getSuperManageableEntityAssociationEnd().hasStereotype(stereotypeName);
1027 }
1028
1029
1030
1031
1032
1033
1034 public boolean isBindingDependenciesPresent()
1035 {
1036 return this.getSuperManageableEntityAssociationEnd().isBindingDependenciesPresent();
1037 }
1038
1039
1040
1041
1042
1043 public boolean isConstraintsPresent()
1044 {
1045 return this.getSuperManageableEntityAssociationEnd().isConstraintsPresent();
1046 }
1047
1048
1049
1050
1051
1052 public boolean isDocumentationPresent()
1053 {
1054 return this.getSuperManageableEntityAssociationEnd().isDocumentationPresent();
1055 }
1056
1057
1058
1059
1060
1061 public boolean isReservedWord()
1062 {
1063 return this.getSuperManageableEntityAssociationEnd().isReservedWord();
1064 }
1065
1066
1067
1068
1069
1070
1071 public boolean isTemplateParametersPresent()
1072 {
1073 return this.getSuperManageableEntityAssociationEnd().isTemplateParametersPresent();
1074 }
1075
1076
1077
1078
1079
1080
1081
1082 public boolean isValidIdentifierName()
1083 {
1084 return this.getSuperManageableEntityAssociationEnd().isValidIdentifierName();
1085 }
1086
1087
1088
1089
1090
1091
1092
1093 public String translateConstraint(String name, String translation)
1094 {
1095 return this.getSuperManageableEntityAssociationEnd().translateConstraint(name, translation);
1096 }
1097
1098
1099
1100
1101
1102 public String[] translateConstraints(String translation)
1103 {
1104 return this.getSuperManageableEntityAssociationEnd().translateConstraints(translation);
1105 }
1106
1107
1108
1109
1110
1111 public String[] translateConstraints(String kind, String translation)
1112 {
1113 return this.getSuperManageableEntityAssociationEnd().translateConstraints(kind, translation);
1114 }
1115
1116
1117
1118
1119 @Override
1120 public void initialize()
1121 {
1122 this.getSuperManageableEntityAssociationEnd().initialize();
1123 }
1124
1125
1126
1127
1128
1129 @Override
1130 public Object getValidationOwner()
1131 {
1132 Object owner = this.getSuperManageableEntityAssociationEnd().getValidationOwner();
1133 return owner;
1134 }
1135
1136
1137
1138
1139
1140 @Override
1141 public String getValidationName()
1142 {
1143 String name = this.getSuperManageableEntityAssociationEnd().getValidationName();
1144 return name;
1145 }
1146
1147
1148
1149
1150
1151 @Override
1152 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1153 {
1154 this.getSuperManageableEntityAssociationEnd().validateInvariants(validationMessages);
1155 }
1156
1157
1158
1159
1160 private static final String NAME_PROPERTY = "name";
1161 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1162
1163
1164
1165
1166 @Override
1167 public String toString()
1168 {
1169 final StringBuilder toString = new StringBuilder(this.getClass().getName());
1170 toString.append("[");
1171 try
1172 {
1173 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1174 }
1175 catch (final Throwable tryAgain)
1176 {
1177 try
1178 {
1179 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1180 }
1181 catch (final Throwable ignore)
1182 {
1183
1184 }
1185 }
1186 toString.append("]");
1187 return toString.toString();
1188 }
1189 }