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

org.openxma.dsl.dom.model.impl.WhenClauseImpl Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
/**
 * 
 * 
 *
 * $Id$
 */
package org.openxma.dsl.dom.model.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.Expression;
import org.openxma.dsl.dom.model.WhenClause;

/**
 * 
 * An implementation of the model object 'When Clause'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.dom.model.impl.WhenClauseImpl#getWhenExpression When Expression}
  • *
  • {@link org.openxma.dsl.dom.model.impl.WhenClauseImpl#getThenExpression Then Expression}
  • *
*

* * @generated */ public class WhenClauseImpl extends MinimalEObjectImpl.Container implements WhenClause { /** * The cached value of the '{@link #getWhenExpression() When Expression}' containment reference. * * * @see #getWhenExpression() * @generated * @ordered */ protected Expression whenExpression; /** * The cached value of the '{@link #getThenExpression() Then Expression}' containment reference. * * * @see #getThenExpression() * @generated * @ordered */ protected Expression thenExpression; /** * * * @generated */ protected WhenClauseImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DomPackage.Literals.WHEN_CLAUSE; } /** * * * @generated */ public Expression getWhenExpression() { return whenExpression; } /** * * * @generated */ public NotificationChain basicSetWhenExpression(Expression newWhenExpression, NotificationChain msgs) { Expression oldWhenExpression = whenExpression; whenExpression = newWhenExpression; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION, oldWhenExpression, newWhenExpression); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setWhenExpression(Expression newWhenExpression) { if (newWhenExpression != whenExpression) { NotificationChain msgs = null; if (whenExpression != null) msgs = ((InternalEObject)whenExpression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION, null, msgs); if (newWhenExpression != null) msgs = ((InternalEObject)newWhenExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION, null, msgs); msgs = basicSetWhenExpression(newWhenExpression, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION, newWhenExpression, newWhenExpression)); } /** * * * @generated */ public Expression getThenExpression() { return thenExpression; } /** * * * @generated */ public NotificationChain basicSetThenExpression(Expression newThenExpression, NotificationChain msgs) { Expression oldThenExpression = thenExpression; thenExpression = newThenExpression; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.WHEN_CLAUSE__THEN_EXPRESSION, oldThenExpression, newThenExpression); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setThenExpression(Expression newThenExpression) { if (newThenExpression != thenExpression) { NotificationChain msgs = null; if (thenExpression != null) msgs = ((InternalEObject)thenExpression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.WHEN_CLAUSE__THEN_EXPRESSION, null, msgs); if (newThenExpression != null) msgs = ((InternalEObject)newThenExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.WHEN_CLAUSE__THEN_EXPRESSION, null, msgs); msgs = basicSetThenExpression(newThenExpression, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.WHEN_CLAUSE__THEN_EXPRESSION, newThenExpression, newThenExpression)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION: return basicSetWhenExpression(null, msgs); case DomPackage.WHEN_CLAUSE__THEN_EXPRESSION: return basicSetThenExpression(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION: return getWhenExpression(); case DomPackage.WHEN_CLAUSE__THEN_EXPRESSION: return getThenExpression(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION: setWhenExpression((Expression)newValue); return; case DomPackage.WHEN_CLAUSE__THEN_EXPRESSION: setThenExpression((Expression)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION: setWhenExpression((Expression)null); return; case DomPackage.WHEN_CLAUSE__THEN_EXPRESSION: setThenExpression((Expression)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DomPackage.WHEN_CLAUSE__WHEN_EXPRESSION: return whenExpression != null; case DomPackage.WHEN_CLAUSE__THEN_EXPRESSION: return thenExpression != null; } return super.eIsSet(featureID); } } //WhenClauseImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy