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