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