All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.andromda.metafacades.emf.uml22.TransitionFacadeLogic Maven / Gradle / Ivy

Go to download

The Eclipse EMF UML2 v2.X metafacades. This is the set of EMF UML2 2.X metafacades implementations. These implement the common UML metafacades for .uml model files.

The newest version!
// license-header java merge-point
//
// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
//
package org.andromda.metafacades.emf.uml22;

import java.util.Collection;
import org.andromda.core.metafacade.MetafacadeBase;
import org.andromda.core.metafacade.ModelValidationMessage;
import org.andromda.metafacades.uml.ActionFacade;
import org.andromda.metafacades.uml.EventFacade;
import org.andromda.metafacades.uml.GuardFacade;
import org.andromda.metafacades.uml.StateVertexFacade;
import org.andromda.metafacades.uml.TransitionFacade;
import org.apache.log4j.Logger;
import org.eclipse.uml2.uml.Transition;

/**
 * 

* A directed relationship between a source vertex and a target * vertex. It may be part of a compound transition, which takes the * state machine from one state configuration to another, * representing the complete response of the state machine to an * occurrence of an event of a particular type. *

* MetafacadeLogic for TransitionFacade * * @see TransitionFacade */ public abstract class TransitionFacadeLogic extends ModelElementFacadeLogicImpl implements TransitionFacade { /** * The underlying UML object * @see Transition */ protected Transition metaObject; /** Create Metafacade implementation instance using the MetafacadeFactory from the context * @param metaObjectIn * @param context */ protected TransitionFacadeLogic(Transition metaObjectIn, String context) { super(metaObjectIn, getContext(context)); this.metaObject = metaObjectIn; } /** * The logger instance. */ private static final Logger logger = Logger.getLogger(TransitionFacadeLogic.class); /** * Gets the context for this metafacade logic instance. * @param context String. Set to TransitionFacade if null * @return context String */ private static String getContext(String context) { if (context == null) { context = "org.andromda.metafacades.uml.TransitionFacade"; } return context; } /** Reset context only for non-root metafacades * @param context */ @Override public void resetMetafacadeContext(String context) { if (!this.contextRoot) // reset context only for non-root metafacades { context = getContext(context); // to have same value as in original constructor call setMetafacadeContext (context); } } /** * @return boolean true always * @see TransitionFacade */ public boolean isTransitionFacadeMetaType() { return true; } // --------------- attributes --------------------- /** * @see TransitionFacade#isTriggerPresent() * @return boolean */ protected abstract boolean handleIsTriggerPresent(); private boolean __triggerPresent1a; private boolean __triggerPresent1aSet = false; /** * * @return (boolean)handleIsTriggerPresent() */ public final boolean isTriggerPresent() { boolean triggerPresent1a = this.__triggerPresent1a; if (!this.__triggerPresent1aSet) { // triggerPresent has no pre constraints triggerPresent1a = handleIsTriggerPresent(); // triggerPresent has no post constraints this.__triggerPresent1a = triggerPresent1a; if (isMetafacadePropertyCachingEnabled()) { this.__triggerPresent1aSet = true; } } return triggerPresent1a; } /** * @see TransitionFacade#isExitingDecisionPoint() * @return boolean */ protected abstract boolean handleIsExitingDecisionPoint(); private boolean __exitingDecisionPoint2a; private boolean __exitingDecisionPoint2aSet = false; /** * * @return (boolean)handleIsExitingDecisionPoint() */ public final boolean isExitingDecisionPoint() { boolean exitingDecisionPoint2a = this.__exitingDecisionPoint2a; if (!this.__exitingDecisionPoint2aSet) { // exitingDecisionPoint has no pre constraints exitingDecisionPoint2a = handleIsExitingDecisionPoint(); // exitingDecisionPoint has no post constraints this.__exitingDecisionPoint2a = exitingDecisionPoint2a; if (isMetafacadePropertyCachingEnabled()) { this.__exitingDecisionPoint2aSet = true; } } return exitingDecisionPoint2a; } /** * @see TransitionFacade#isEnteringDecisionPoint() * @return boolean */ protected abstract boolean handleIsEnteringDecisionPoint(); private boolean __enteringDecisionPoint3a; private boolean __enteringDecisionPoint3aSet = false; /** * * @return (boolean)handleIsEnteringDecisionPoint() */ public final boolean isEnteringDecisionPoint() { boolean enteringDecisionPoint3a = this.__enteringDecisionPoint3a; if (!this.__enteringDecisionPoint3aSet) { // enteringDecisionPoint has no pre constraints enteringDecisionPoint3a = handleIsEnteringDecisionPoint(); // enteringDecisionPoint has no post constraints this.__enteringDecisionPoint3a = enteringDecisionPoint3a; if (isMetafacadePropertyCachingEnabled()) { this.__enteringDecisionPoint3aSet = true; } } return enteringDecisionPoint3a; } /** * @see TransitionFacade#isExitingActionState() * @return boolean */ protected abstract boolean handleIsExitingActionState(); private boolean __exitingActionState4a; private boolean __exitingActionState4aSet = false; /** * * @return (boolean)handleIsExitingActionState() */ public final boolean isExitingActionState() { boolean exitingActionState4a = this.__exitingActionState4a; if (!this.__exitingActionState4aSet) { // exitingActionState has no pre constraints exitingActionState4a = handleIsExitingActionState(); // exitingActionState has no post constraints this.__exitingActionState4a = exitingActionState4a; if (isMetafacadePropertyCachingEnabled()) { this.__exitingActionState4aSet = true; } } return exitingActionState4a; } /** * @see TransitionFacade#isEnteringActionState() * @return boolean */ protected abstract boolean handleIsEnteringActionState(); private boolean __enteringActionState5a; private boolean __enteringActionState5aSet = false; /** * * @return (boolean)handleIsEnteringActionState() */ public final boolean isEnteringActionState() { boolean enteringActionState5a = this.__enteringActionState5a; if (!this.__enteringActionState5aSet) { // enteringActionState has no pre constraints enteringActionState5a = handleIsEnteringActionState(); // enteringActionState has no post constraints this.__enteringActionState5a = enteringActionState5a; if (isMetafacadePropertyCachingEnabled()) { this.__enteringActionState5aSet = true; } } return enteringActionState5a; } /** * @see TransitionFacade#isExitingInitialState() * @return boolean */ protected abstract boolean handleIsExitingInitialState(); private boolean __exitingInitialState6a; private boolean __exitingInitialState6aSet = false; /** * * @return (boolean)handleIsExitingInitialState() */ public final boolean isExitingInitialState() { boolean exitingInitialState6a = this.__exitingInitialState6a; if (!this.__exitingInitialState6aSet) { // exitingInitialState has no pre constraints exitingInitialState6a = handleIsExitingInitialState(); // exitingInitialState has no post constraints this.__exitingInitialState6a = exitingInitialState6a; if (isMetafacadePropertyCachingEnabled()) { this.__exitingInitialState6aSet = true; } } return exitingInitialState6a; } /** * @see TransitionFacade#isEnteringFinalState() * @return boolean */ protected abstract boolean handleIsEnteringFinalState(); private boolean __enteringFinalState7a; private boolean __enteringFinalState7aSet = false; /** * * @return (boolean)handleIsEnteringFinalState() */ public final boolean isEnteringFinalState() { boolean enteringFinalState7a = this.__enteringFinalState7a; if (!this.__enteringFinalState7aSet) { // enteringFinalState has no pre constraints enteringFinalState7a = handleIsEnteringFinalState(); // enteringFinalState has no post constraints this.__enteringFinalState7a = enteringFinalState7a; if (isMetafacadePropertyCachingEnabled()) { this.__enteringFinalState7aSet = true; } } return enteringFinalState7a; } // ------------- associations ------------------ /** *

* If this action is located on a transition, this represents that * transition. *

* @return (ActionFacade)handleGetEffect() */ public final ActionFacade getEffect() { ActionFacade getEffect1r = null; // transition has no pre constraints Object result = handleGetEffect(); MetafacadeBase shieldedResult = this.shieldedElement(result); try { getEffect1r = (ActionFacade)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn TransitionFacadeLogic.logger.warn("incorrect metafacade cast for TransitionFacadeLogic.getEffect ActionFacade " + result + ": " + shieldedResult); } // transition has no post constraints return getEffect1r; } /** * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type * @return Object */ protected abstract Object handleGetEffect(); /** *

* If this event is located on a transition, this represents that * transition. *

* @return (EventFacade)handleGetTrigger() */ public final EventFacade getTrigger() { EventFacade getTrigger2r = null; // transition has no pre constraints Object result = handleGetTrigger(); MetafacadeBase shieldedResult = this.shieldedElement(result); try { getTrigger2r = (EventFacade)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn TransitionFacadeLogic.logger.warn("incorrect metafacade cast for TransitionFacadeLogic.getTrigger EventFacade " + result + ": " + shieldedResult); } // transition has no post constraints return getTrigger2r; } /** * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type * @return Object */ protected abstract Object handleGetTrigger(); /** * * @return (StateVertexFacade)handleGetTarget() */ public final StateVertexFacade getTarget() { StateVertexFacade getTarget3r = null; // outgoings has no pre constraints Object result = handleGetTarget(); MetafacadeBase shieldedResult = this.shieldedElement(result); try { getTarget3r = (StateVertexFacade)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn TransitionFacadeLogic.logger.warn("incorrect metafacade cast for TransitionFacadeLogic.getTarget StateVertexFacade " + result + ": " + shieldedResult); } // outgoings has no post constraints return getTarget3r; } /** * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type * @return Object */ protected abstract Object handleGetTarget(); /** * * @return (StateVertexFacade)handleGetSource() */ public final StateVertexFacade getSource() { StateVertexFacade getSource4r = null; // incomings has no pre constraints Object result = handleGetSource(); MetafacadeBase shieldedResult = this.shieldedElement(result); try { getSource4r = (StateVertexFacade)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn TransitionFacadeLogic.logger.warn("incorrect metafacade cast for TransitionFacadeLogic.getSource StateVertexFacade " + result + ": " + shieldedResult); } // incomings has no post constraints return getSource4r; } /** * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type * @return Object */ protected abstract Object handleGetSource(); /** * * @return (GuardFacade)handleGetGuard() */ public final GuardFacade getGuard() { GuardFacade getGuard5r = null; // transition has no pre constraints Object result = handleGetGuard(); MetafacadeBase shieldedResult = this.shieldedElement(result); try { getGuard5r = (GuardFacade)shieldedResult; } catch (ClassCastException ex) { // Bad things happen if the metafacade type mapping in metafacades.xml is wrong - Warn TransitionFacadeLogic.logger.warn("incorrect metafacade cast for TransitionFacadeLogic.getGuard GuardFacade " + result + ": " + shieldedResult); } // transition has no post constraints return getGuard5r; } /** * UML Specific type is transformed by shieldedElements to AndroMDA Metafacade type * @return Object */ protected abstract Object handleGetGuard(); /** * @param validationMessages Collection * @see ModelElementFacadeLogicImpl#validateInvariants(Collection validationMessages) */ @Override public void validateInvariants(Collection validationMessages) { super.validateInvariants(validationMessages); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy