1
2
3
4 package org.andromda.metafacades.uml14;
5
6 /***
7 * MetafacadeLogic for org.andromda.metafacades.uml.IncludeFacade
8 *
9 * @see org.andromda.metafacades.uml.IncludeFacade
10 */
11 public abstract class IncludeFacadeLogic
12 extends org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl
13 implements org.andromda.metafacades.uml.IncludeFacade
14 {
15
16 protected org.omg.uml.behavioralelements.usecases.Include metaObject;
17
18 public IncludeFacadeLogic(org.omg.uml.behavioralelements.usecases.Include metaObject, String context)
19 {
20 super(metaObject, getContext(context));
21 this.metaObject = metaObject;
22 }
23
24 /***
25 * Gets the context for this metafacade logic instance.
26 */
27 private static String getContext(String context)
28 {
29 if (context == null)
30 {
31 context = "org.andromda.metafacades.uml.IncludeFacade";
32 }
33 return context;
34 }
35
36 /***
37 * @see org.andromda.core.metafacade.MetafacadeBase
38 */
39 public void resetMetafacadeContext(String context)
40 {
41 if (!this.contextRoot)
42 {
43 context = getContext(context);
44 setMetafacadeContext (context);
45 }
46 }
47
48 /***
49 * @see org.andromda.metafacades.uml.IncludeFacade
50 */
51 public boolean isIncludeFacadeMetaType()
52 {
53 return true;
54 }
55
56
57
58 private void handleGetBase1rPreCondition()
59 {
60 }
61
62 private void handleGetBase1rPostCondition()
63 {
64 }
65
66 public final org.andromda.metafacades.uml.UseCaseFacade getBase()
67 {
68 org.andromda.metafacades.uml.UseCaseFacade getBase1r = null;
69 handleGetBase1rPreCondition();
70 Object result = this.shieldedElement(handleGetBase());
71 try
72 {
73 getBase1r = (org.andromda.metafacades.uml.UseCaseFacade)result;
74 }
75 catch (ClassCastException ex)
76 {
77
78
79 }
80 handleGetBase1rPostCondition();
81 return getBase1r;
82 }
83
84 protected abstract java.lang.Object handleGetBase();
85
86 private void handleGetAddition2rPreCondition()
87 {
88 }
89
90 private void handleGetAddition2rPostCondition()
91 {
92 }
93
94 public final org.andromda.metafacades.uml.UseCaseFacade getAddition()
95 {
96 org.andromda.metafacades.uml.UseCaseFacade getAddition2r = null;
97 handleGetAddition2rPreCondition();
98 Object result = this.shieldedElement(handleGetAddition());
99 try
100 {
101 getAddition2r = (org.andromda.metafacades.uml.UseCaseFacade)result;
102 }
103 catch (ClassCastException ex)
104 {
105
106
107 }
108 handleGetAddition2rPostCondition();
109 return getAddition2r;
110 }
111
112 protected abstract java.lang.Object handleGetAddition();
113
114 /***
115 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
116 */
117 public void validateInvariants(java.util.Collection validationMessages)
118 {
119 super.validateInvariants(validationMessages);
120 }
121
122 /***
123 * The property that stores the name of the metafacade.
124 */
125 private static final String NAME_PROPERTY = "name";
126
127 /***
128 * @see java.lang.Object#toString()
129 */
130 public String toString()
131 {
132 final StringBuffer toString = new StringBuffer(this.getClass().getName());
133 toString.append("[");
134 try
135 {
136 toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
137 }
138 catch (final Throwable throwable)
139 {
140
141 }
142 toString.append("]");
143 return toString.toString();
144 }
145 }