001// license-header java merge-point 002// 003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify! 004// 005package org.andromda.metafacades.uml14; 006 007import java.util.Collection; 008import org.andromda.core.metafacade.ModelValidationMessage; 009import org.andromda.metafacades.uml.PseudostateFacade; 010import org.omg.uml.behavioralelements.statemachines.Pseudostate; 011 012/** 013 * An abstraction that encompasses different types of transient vertices in the state machine graph. 014 * MetafacadeLogic for PseudostateFacade 015 * 016 * @see PseudostateFacade 017 */ 018public abstract class PseudostateFacadeLogic 019 extends StateVertexFacadeLogicImpl 020 implements PseudostateFacade 021{ 022 /** 023 * The underlying UML object 024 * @see Pseudostate 025 */ 026 protected Pseudostate metaObject; 027 028 /** Create Metafacade implementation instance using the MetafacadeFactory from the context 029 * @param metaObjectIn 030 * @param context 031 */ 032 protected PseudostateFacadeLogic(Pseudostate metaObjectIn, String context) 033 { 034 super(metaObjectIn, getContext(context)); 035 this.metaObject = metaObjectIn; 036 } 037 038 /** 039 * Gets the context for this metafacade logic instance. 040 * @param context String. Set to PseudostateFacade if null 041 * @return context String 042 */ 043 private static String getContext(String context) 044 { 045 if (context == null) 046 { 047 context = "org.andromda.metafacades.uml.PseudostateFacade"; 048 } 049 return context; 050 } 051 052 /** Reset context only for non-root metafacades 053 * @param context 054 */ 055 @Override 056 public void resetMetafacadeContext(String context) 057 { 058 if (!this.contextRoot) // reset context only for non-root metafacades 059 { 060 context = getContext(context); // to have same value as in original constructor call 061 setMetafacadeContext (context); 062 } 063 } 064 065 /** 066 * @return boolean true always 067 * @see PseudostateFacade 068 */ 069 public boolean isPseudostateFacadeMetaType() 070 { 071 return true; 072 } 073 074 // --------------- attributes --------------------- 075 076 /** 077 * @see PseudostateFacade#isChoice() 078 * @return boolean 079 */ 080 protected abstract boolean handleIsChoice(); 081 082 private boolean __choice1a; 083 private boolean __choice1aSet = false; 084 085 /** 086 * TODO: Model Documentation for PseudostateFacade.choice 087 * @return (boolean)handleIsChoice() 088 */ 089 public final boolean isChoice() 090 { 091 boolean choice1a = this.__choice1a; 092 if (!this.__choice1aSet) 093 { 094 // choice has no pre constraints 095 choice1a = handleIsChoice(); 096 // choice has no post constraints 097 this.__choice1a = choice1a; 098 if (isMetafacadePropertyCachingEnabled()) 099 { 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}