1
2
3
4 package org.andromda.metafacades.uml14;
5
6 /***
7 * MetafacadeLogic for org.andromda.metafacades.uml.TransitionFacade
8 *
9 * @see org.andromda.metafacades.uml.TransitionFacade
10 */
11 public abstract class TransitionFacadeLogic
12 extends org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl
13 implements org.andromda.metafacades.uml.TransitionFacade
14 {
15
16 protected org.omg.uml.behavioralelements.statemachines.Transition metaObject;
17
18 public TransitionFacadeLogic(org.omg.uml.behavioralelements.statemachines.Transition 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.TransitionFacade";
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.TransitionFacade
50 */
51 public boolean isTransitionFacadeMetaType()
52 {
53 return true;
54 }
55
56
57
58 /***
59 * @see org.andromda.metafacades.uml.TransitionFacade#isTriggerPresent()
60 */
61 protected abstract boolean handleIsTriggerPresent();
62
63 private void handleIsTriggerPresent1aPreCondition()
64 {
65 }
66
67 private void handleIsTriggerPresent1aPostCondition()
68 {
69 }
70
71 private boolean __triggerPresent1a;
72 private boolean __triggerPresent1aSet = false;
73
74 public final boolean isTriggerPresent()
75 {
76 boolean triggerPresent1a = this.__triggerPresent1a;
77 if (!this.__triggerPresent1aSet)
78 {
79 handleIsTriggerPresent1aPreCondition();
80 triggerPresent1a = handleIsTriggerPresent();
81 handleIsTriggerPresent1aPostCondition();
82 this.__triggerPresent1a = triggerPresent1a;
83 if (isMetafacadePropertyCachingEnabled())
84 {
85 this.__triggerPresent1aSet = true;
86 }
87 }
88 return triggerPresent1a;
89 }
90
91 /***
92 * @see org.andromda.metafacades.uml.TransitionFacade#isExitingDecisionPoint()
93 */
94 protected abstract boolean handleIsExitingDecisionPoint();
95
96 private void handleIsExitingDecisionPoint2aPreCondition()
97 {
98 }
99
100 private void handleIsExitingDecisionPoint2aPostCondition()
101 {
102 }
103
104 private boolean __exitingDecisionPoint2a;
105 private boolean __exitingDecisionPoint2aSet = false;
106
107 public final boolean isExitingDecisionPoint()
108 {
109 boolean exitingDecisionPoint2a = this.__exitingDecisionPoint2a;
110 if (!this.__exitingDecisionPoint2aSet)
111 {
112 handleIsExitingDecisionPoint2aPreCondition();
113 exitingDecisionPoint2a = handleIsExitingDecisionPoint();
114 handleIsExitingDecisionPoint2aPostCondition();
115 this.__exitingDecisionPoint2a = exitingDecisionPoint2a;
116 if (isMetafacadePropertyCachingEnabled())
117 {
118 this.__exitingDecisionPoint2aSet = true;
119 }
120 }
121 return exitingDecisionPoint2a;
122 }
123
124 /***
125 * @see org.andromda.metafacades.uml.TransitionFacade#isEnteringDecisionPoint()
126 */
127 protected abstract boolean handleIsEnteringDecisionPoint();
128
129 private void handleIsEnteringDecisionPoint3aPreCondition()
130 {
131 }
132
133 private void handleIsEnteringDecisionPoint3aPostCondition()
134 {
135 }
136
137 private boolean __enteringDecisionPoint3a;
138 private boolean __enteringDecisionPoint3aSet = false;
139
140 public final boolean isEnteringDecisionPoint()
141 {
142 boolean enteringDecisionPoint3a = this.__enteringDecisionPoint3a;
143 if (!this.__enteringDecisionPoint3aSet)
144 {
145 handleIsEnteringDecisionPoint3aPreCondition();
146 enteringDecisionPoint3a = handleIsEnteringDecisionPoint();
147 handleIsEnteringDecisionPoint3aPostCondition();
148 this.__enteringDecisionPoint3a = enteringDecisionPoint3a;
149 if (isMetafacadePropertyCachingEnabled())
150 {
151 this.__enteringDecisionPoint3aSet = true;
152 }
153 }
154 return enteringDecisionPoint3a;
155 }
156
157 /***
158 * @see org.andromda.metafacades.uml.TransitionFacade#isExitingActionState()
159 */
160 protected abstract boolean handleIsExitingActionState();
161
162 private void handleIsExitingActionState4aPreCondition()
163 {
164 }
165
166 private void handleIsExitingActionState4aPostCondition()
167 {
168 }
169
170 private boolean __exitingActionState4a;
171 private boolean __exitingActionState4aSet = false;
172
173 public final boolean isExitingActionState()
174 {
175 boolean exitingActionState4a = this.__exitingActionState4a;
176 if (!this.__exitingActionState4aSet)
177 {
178 handleIsExitingActionState4aPreCondition();
179 exitingActionState4a = handleIsExitingActionState();
180 handleIsExitingActionState4aPostCondition();
181 this.__exitingActionState4a = exitingActionState4a;
182 if (isMetafacadePropertyCachingEnabled())
183 {
184 this.__exitingActionState4aSet = true;
185 }
186 }
187 return exitingActionState4a;
188 }
189
190 /***
191 * @see org.andromda.metafacades.uml.TransitionFacade#isEnteringActionState()
192 */
193 protected abstract boolean handleIsEnteringActionState();
194
195 private void handleIsEnteringActionState5aPreCondition()
196 {
197 }
198
199 private void handleIsEnteringActionState5aPostCondition()
200 {
201 }
202
203 private boolean __enteringActionState5a;
204 private boolean __enteringActionState5aSet = false;
205
206 public final boolean isEnteringActionState()
207 {
208 boolean enteringActionState5a = this.__enteringActionState5a;
209 if (!this.__enteringActionState5aSet)
210 {
211 handleIsEnteringActionState5aPreCondition();
212 enteringActionState5a = handleIsEnteringActionState();
213 handleIsEnteringActionState5aPostCondition();
214 this.__enteringActionState5a = enteringActionState5a;
215 if (isMetafacadePropertyCachingEnabled())
216 {
217 this.__enteringActionState5aSet = true;
218 }
219 }
220 return enteringActionState5a;
221 }
222
223 /***
224 * @see org.andromda.metafacades.uml.TransitionFacade#isExitingInitialState()
225 */
226 protected abstract boolean handleIsExitingInitialState();
227
228 private void handleIsExitingInitialState6aPreCondition()
229 {
230 }
231
232 private void handleIsExitingInitialState6aPostCondition()
233 {
234 }
235
236 private boolean __exitingInitialState6a;
237 private boolean __exitingInitialState6aSet = false;
238
239 public final boolean isExitingInitialState()
240 {
241 boolean exitingInitialState6a = this.__exitingInitialState6a;
242 if (!this.__exitingInitialState6aSet)
243 {
244 handleIsExitingInitialState6aPreCondition();
245 exitingInitialState6a = handleIsExitingInitialState();
246 handleIsExitingInitialState6aPostCondition();
247 this.__exitingInitialState6a = exitingInitialState6a;
248 if (isMetafacadePropertyCachingEnabled())
249 {
250 this.__exitingInitialState6aSet = true;
251 }
252 }
253 return exitingInitialState6a;
254 }
255
256 /***
257 * @see org.andromda.metafacades.uml.TransitionFacade#isEnteringFinalState()
258 */
259 protected abstract boolean handleIsEnteringFinalState();
260
261 private void handleIsEnteringFinalState7aPreCondition()
262 {
263 }
264
265 private void handleIsEnteringFinalState7aPostCondition()
266 {
267 }
268
269 private boolean __enteringFinalState7a;
270 private boolean __enteringFinalState7aSet = false;
271
272 public final boolean isEnteringFinalState()
273 {
274 boolean enteringFinalState7a = this.__enteringFinalState7a;
275 if (!this.__enteringFinalState7aSet)
276 {
277 handleIsEnteringFinalState7aPreCondition();
278 enteringFinalState7a = handleIsEnteringFinalState();
279 handleIsEnteringFinalState7aPostCondition();
280 this.__enteringFinalState7a = enteringFinalState7a;
281 if (isMetafacadePropertyCachingEnabled())
282 {
283 this.__enteringFinalState7aSet = true;
284 }
285 }
286 return enteringFinalState7a;
287 }
288
289
290
291 private void handleGetEffect1rPreCondition()
292 {
293 }
294
295 private void handleGetEffect1rPostCondition()
296 {
297 }
298
299 public final org.andromda.metafacades.uml.ActionFacade getEffect()
300 {
301 org.andromda.metafacades.uml.ActionFacade getEffect1r = null;
302 handleGetEffect1rPreCondition();
303 Object result = this.shieldedElement(handleGetEffect());
304 try
305 {
306 getEffect1r = (org.andromda.metafacades.uml.ActionFacade)result;
307 }
308 catch (ClassCastException ex)
309 {
310
311
312 }
313 handleGetEffect1rPostCondition();
314 return getEffect1r;
315 }
316
317 protected abstract java.lang.Object handleGetEffect();
318
319 private void handleGetTrigger2rPreCondition()
320 {
321 }
322
323 private void handleGetTrigger2rPostCondition()
324 {
325 }
326
327 public final org.andromda.metafacades.uml.EventFacade getTrigger()
328 {
329 org.andromda.metafacades.uml.EventFacade getTrigger2r = null;
330 handleGetTrigger2rPreCondition();
331 Object result = this.shieldedElement(handleGetTrigger());
332 try
333 {
334 getTrigger2r = (org.andromda.metafacades.uml.EventFacade)result;
335 }
336 catch (ClassCastException ex)
337 {
338
339
340 }
341 handleGetTrigger2rPostCondition();
342 return getTrigger2r;
343 }
344
345 protected abstract java.lang.Object handleGetTrigger();
346
347 private void handleGetTarget3rPreCondition()
348 {
349 }
350
351 private void handleGetTarget3rPostCondition()
352 {
353 }
354
355 public final org.andromda.metafacades.uml.StateVertexFacade getTarget()
356 {
357 org.andromda.metafacades.uml.StateVertexFacade getTarget3r = null;
358 handleGetTarget3rPreCondition();
359 Object result = this.shieldedElement(handleGetTarget());
360 try
361 {
362 getTarget3r = (org.andromda.metafacades.uml.StateVertexFacade)result;
363 }
364 catch (ClassCastException ex)
365 {
366
367
368 }
369 handleGetTarget3rPostCondition();
370 return getTarget3r;
371 }
372
373 protected abstract java.lang.Object handleGetTarget();
374
375 private void handleGetSource4rPreCondition()
376 {
377 }
378
379 private void handleGetSource4rPostCondition()
380 {
381 }
382
383 public final org.andromda.metafacades.uml.StateVertexFacade getSource()
384 {
385 org.andromda.metafacades.uml.StateVertexFacade getSource4r = null;
386 handleGetSource4rPreCondition();
387 Object result = this.shieldedElement(handleGetSource());
388 try
389 {
390 getSource4r = (org.andromda.metafacades.uml.StateVertexFacade)result;
391 }
392 catch (ClassCastException ex)
393 {
394
395
396 }
397 handleGetSource4rPostCondition();
398 return getSource4r;
399 }
400
401 protected abstract java.lang.Object handleGetSource();
402
403 private void handleGetGuard5rPreCondition()
404 {
405 }
406
407 private void handleGetGuard5rPostCondition()
408 {
409 }
410
411 public final org.andromda.metafacades.uml.GuardFacade getGuard()
412 {
413 org.andromda.metafacades.uml.GuardFacade getGuard5r = null;
414 handleGetGuard5rPreCondition();
415 Object result = this.shieldedElement(handleGetGuard());
416 try
417 {
418 getGuard5r = (org.andromda.metafacades.uml.GuardFacade)result;
419 }
420 catch (ClassCastException ex)
421 {
422
423
424 }
425 handleGetGuard5rPostCondition();
426 return getGuard5r;
427 }
428
429 protected abstract java.lang.Object handleGetGuard();
430
431 /***
432 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
433 */
434 public void validateInvariants(java.util.Collection validationMessages)
435 {
436 super.validateInvariants(validationMessages);
437 }
438
439 /***
440 * The property that stores the name of the metafacade.
441 */
442 private static final String NAME_PROPERTY = "name";
443
444 /***
445 * @see java.lang.Object#toString()
446 */
447 public String toString()
448 {
449 final StringBuffer toString = new StringBuffer(this.getClass().getName());
450 toString.append("[");
451 try
452 {
453 toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
454 }
455 catch (final Throwable throwable)
456 {
457
458 }
459 toString.append("]");
460 return toString.toString();
461 }
462 }