View Javadoc
1   // license-header java merge-point
2   //
3   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4   //
5   package org.andromda.metafacades.uml14;
6   
7   import java.util.Collection;
8   import org.andromda.core.metafacade.ModelValidationMessage;
9   import org.andromda.metafacades.uml.PseudostateFacade;
10  import org.omg.uml.behavioralelements.statemachines.Pseudostate;
11  
12  /**
13   * An abstraction that encompasses different types of transient vertices in the state machine graph.
14   * MetafacadeLogic for PseudostateFacade
15   *
16   * @see PseudostateFacade
17   */
18  public abstract class PseudostateFacadeLogic
19      extends StateVertexFacadeLogicImpl
20      implements PseudostateFacade
21  {
22      /**
23       * The underlying UML object
24       * @see Pseudostate
25       */
26      protected Pseudostate metaObject;
27  
28      /** Create Metafacade implementation instance using the MetafacadeFactory from the context
29       * @param metaObjectIn
30       * @param context
31       */
32      protected PseudostateFacadeLogic(Pseudostate metaObjectIn, String context)
33      {
34          super(metaObjectIn, getContext(context));
35          this.metaObject = metaObjectIn;
36      }
37  
38      /**
39       * Gets the context for this metafacade logic instance.
40       * @param context String. Set to PseudostateFacade if null
41       * @return context String
42       */
43      private static String getContext(String context)
44      {
45          if (context == null)
46          {
47              context = "org.andromda.metafacades.uml.PseudostateFacade";
48          }
49          return context;
50      }
51  
52      /** Reset context only for non-root metafacades
53       * @param context
54       */
55      @Override
56      public void resetMetafacadeContext(String context)
57      {
58          if (!this.contextRoot) // reset context only for non-root metafacades
59          {
60              context = getContext(context);  // to have same value as in original constructor call
61              setMetafacadeContext (context);
62          }
63      }
64  
65      /**
66       * @return boolean true always
67       * @see PseudostateFacade
68       */
69      public boolean isPseudostateFacadeMetaType()
70      {
71          return true;
72      }
73  
74      // --------------- attributes ---------------------
75  
76     /**
77      * @see PseudostateFacade#isChoice()
78      * @return boolean
79      */
80      protected abstract boolean handleIsChoice();
81  
82      private boolean __choice1a;
83      private boolean __choice1aSet = false;
84  
85      /**
86       * TODO: Model Documentation for PseudostateFacade.choice
87       * @return (boolean)handleIsChoice()
88       */
89      public final boolean isChoice()
90      {
91          boolean choice1a = this.__choice1a;
92          if (!this.__choice1aSet)
93          {
94              // choice has no pre constraints
95              choice1a = handleIsChoice();
96              // choice has no post constraints
97              this.__choice1a = choice1a;
98              if (isMetafacadePropertyCachingEnabled())
99              {
100                 this.__choice1aSet = true;
101             }
102         }
103         return choice1a;
104     }
105 
106    /**
107     * @see PseudostateFacade#isDecisionPoint()
108     * @return boolean
109     */
110     protected abstract boolean handleIsDecisionPoint();
111 
112     private boolean __decisionPoint2a;
113     private boolean __decisionPoint2aSet = false;
114 
115     /**
116      * TODO: Model Documentation for PseudostateFacade.decisionPoint
117      * @return (boolean)handleIsDecisionPoint()
118      */
119     public final boolean isDecisionPoint()
120     {
121         boolean decisionPoint2a = this.__decisionPoint2a;
122         if (!this.__decisionPoint2aSet)
123         {
124             // decisionPoint has no pre constraints
125             decisionPoint2a = handleIsDecisionPoint();
126             // decisionPoint has no post constraints
127             this.__decisionPoint2a = decisionPoint2a;
128             if (isMetafacadePropertyCachingEnabled())
129             {
130                 this.__decisionPoint2aSet = true;
131             }
132         }
133         return decisionPoint2a;
134     }
135 
136    /**
137     * @see PseudostateFacade#isDeepHistory()
138     * @return boolean
139     */
140     protected abstract boolean handleIsDeepHistory();
141 
142     private boolean __deepHistory3a;
143     private boolean __deepHistory3aSet = false;
144 
145     /**
146      * TODO: Model Documentation for PseudostateFacade.deepHistory
147      * @return (boolean)handleIsDeepHistory()
148      */
149     public final boolean isDeepHistory()
150     {
151         boolean deepHistory3a = this.__deepHistory3a;
152         if (!this.__deepHistory3aSet)
153         {
154             // deepHistory has no pre constraints
155             deepHistory3a = handleIsDeepHistory();
156             // deepHistory has no post constraints
157             this.__deepHistory3a = deepHistory3a;
158             if (isMetafacadePropertyCachingEnabled())
159             {
160                 this.__deepHistory3aSet = true;
161             }
162         }
163         return deepHistory3a;
164     }
165 
166    /**
167     * @see PseudostateFacade#isFork()
168     * @return boolean
169     */
170     protected abstract boolean handleIsFork();
171 
172     private boolean __fork4a;
173     private boolean __fork4aSet = false;
174 
175     /**
176      * TODO: Model Documentation for PseudostateFacade.fork
177      * @return (boolean)handleIsFork()
178      */
179     public final boolean isFork()
180     {
181         boolean fork4a = this.__fork4a;
182         if (!this.__fork4aSet)
183         {
184             // fork has no pre constraints
185             fork4a = handleIsFork();
186             // fork has no post constraints
187             this.__fork4a = fork4a;
188             if (isMetafacadePropertyCachingEnabled())
189             {
190                 this.__fork4aSet = true;
191             }
192         }
193         return fork4a;
194     }
195 
196    /**
197     * @see PseudostateFacade#isInitialState()
198     * @return boolean
199     */
200     protected abstract boolean handleIsInitialState();
201 
202     private boolean __initialState5a;
203     private boolean __initialState5aSet = false;
204 
205     /**
206      * TODO: Model Documentation for PseudostateFacade.initialState
207      * @return (boolean)handleIsInitialState()
208      */
209     public final boolean isInitialState()
210     {
211         boolean initialState5a = this.__initialState5a;
212         if (!this.__initialState5aSet)
213         {
214             // initialState has no pre constraints
215             initialState5a = handleIsInitialState();
216             // initialState has no post constraints
217             this.__initialState5a = initialState5a;
218             if (isMetafacadePropertyCachingEnabled())
219             {
220                 this.__initialState5aSet = true;
221             }
222         }
223         return initialState5a;
224     }
225 
226    /**
227     * @see PseudostateFacade#isJoin()
228     * @return boolean
229     */
230     protected abstract boolean handleIsJoin();
231 
232     private boolean __join6a;
233     private boolean __join6aSet = false;
234 
235     /**
236      * TODO: Model Documentation for PseudostateFacade.join
237      * @return (boolean)handleIsJoin()
238      */
239     public final boolean isJoin()
240     {
241         boolean join6a = this.__join6a;
242         if (!this.__join6aSet)
243         {
244             // join has no pre constraints
245             join6a = handleIsJoin();
246             // join has no post constraints
247             this.__join6a = join6a;
248             if (isMetafacadePropertyCachingEnabled())
249             {
250                 this.__join6aSet = true;
251             }
252         }
253         return join6a;
254     }
255 
256    /**
257     * @see PseudostateFacade#isJunction()
258     * @return boolean
259     */
260     protected abstract boolean handleIsJunction();
261 
262     private boolean __junction7a;
263     private boolean __junction7aSet = false;
264 
265     /**
266      * TODO: Model Documentation for PseudostateFacade.junction
267      * @return (boolean)handleIsJunction()
268      */
269     public final boolean isJunction()
270     {
271         boolean junction7a = this.__junction7a;
272         if (!this.__junction7aSet)
273         {
274             // junction has no pre constraints
275             junction7a = handleIsJunction();
276             // junction has no post constraints
277             this.__junction7a = junction7a;
278             if (isMetafacadePropertyCachingEnabled())
279             {
280                 this.__junction7aSet = true;
281             }
282         }
283         return junction7a;
284     }
285 
286    /**
287     * @see PseudostateFacade#isMergePoint()
288     * @return boolean
289     */
290     protected abstract boolean handleIsMergePoint();
291 
292     private boolean __mergePoint8a;
293     private boolean __mergePoint8aSet = false;
294 
295     /**
296      * TODO: Model Documentation for PseudostateFacade.mergePoint
297      * @return (boolean)handleIsMergePoint()
298      */
299     public final boolean isMergePoint()
300     {
301         boolean mergePoint8a = this.__mergePoint8a;
302         if (!this.__mergePoint8aSet)
303         {
304             // mergePoint has no pre constraints
305             mergePoint8a = handleIsMergePoint();
306             // mergePoint has no post constraints
307             this.__mergePoint8a = mergePoint8a;
308             if (isMetafacadePropertyCachingEnabled())
309             {
310                 this.__mergePoint8aSet = true;
311             }
312         }
313         return mergePoint8a;
314     }
315 
316    /**
317     * @see PseudostateFacade#isShallowHistory()
318     * @return boolean
319     */
320     protected abstract boolean handleIsShallowHistory();
321 
322     private boolean __shallowHistory9a;
323     private boolean __shallowHistory9aSet = false;
324 
325     /**
326      * TODO: Model Documentation for PseudostateFacade.shallowHistory
327      * @return (boolean)handleIsShallowHistory()
328      */
329     public final boolean isShallowHistory()
330     {
331         boolean shallowHistory9a = this.__shallowHistory9a;
332         if (!this.__shallowHistory9aSet)
333         {
334             // shallowHistory has no pre constraints
335             shallowHistory9a = handleIsShallowHistory();
336             // shallowHistory has no post constraints
337             this.__shallowHistory9a = shallowHistory9a;
338             if (isMetafacadePropertyCachingEnabled())
339             {
340                 this.__shallowHistory9aSet = true;
341             }
342         }
343         return shallowHistory9a;
344     }
345 
346    /**
347     * @see PseudostateFacade#isSplit()
348     * @return boolean
349     */
350     protected abstract boolean handleIsSplit();
351 
352     private boolean __split10a;
353     private boolean __split10aSet = false;
354 
355     /**
356      * Denotes this pseudostate to be either a join or a fork with a single incoming transition and
357      * more than one outgoing transition.
358      * @return (boolean)handleIsSplit()
359      */
360     public final boolean isSplit()
361     {
362         boolean split10a = this.__split10a;
363         if (!this.__split10aSet)
364         {
365             // split has no pre constraints
366             split10a = handleIsSplit();
367             // split has no post constraints
368             this.__split10a = split10a;
369             if (isMetafacadePropertyCachingEnabled())
370             {
371                 this.__split10aSet = true;
372             }
373         }
374         return split10a;
375     }
376 
377    /**
378     * @see PseudostateFacade#isCollect()
379     * @return boolean
380     */
381     protected abstract boolean handleIsCollect();
382 
383     private boolean __collect11a;
384     private boolean __collect11aSet = false;
385 
386     /**
387      * Denotes this pseudostate to be either a join or a fork with a single outgoing transition and
388      * more than one incoming transition.
389      * @return (boolean)handleIsCollect()
390      */
391     public final boolean isCollect()
392     {
393         boolean collect11a = this.__collect11a;
394         if (!this.__collect11aSet)
395         {
396             // collect has no pre constraints
397             collect11a = handleIsCollect();
398             // collect has no post constraints
399             this.__collect11a = collect11a;
400             if (isMetafacadePropertyCachingEnabled())
401             {
402                 this.__collect11aSet = true;
403             }
404         }
405         return collect11a;
406     }
407 
408     // ------------- associations ------------------
409 
410     /**
411      * @param validationMessages Collection<ModelValidationMessage>
412      * @see StateVertexFacadeLogicImpl#validateInvariants(Collection validationMessages)
413      */
414     @Override
415     public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
416     {
417         super.validateInvariants(validationMessages);
418     }
419 }