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

org.openxma.dsl.dom.model.impl.CastFunctionImpl 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.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.CastFunction;
import org.openxma.dsl.dom.model.Expression;

/**
 * 
 * An implementation of the model object 'Cast Function'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.dom.model.impl.CastFunctionImpl#getFunction Function}
  • *
  • {@link org.openxma.dsl.dom.model.impl.CastFunctionImpl#getFrom From}
  • *
  • {@link org.openxma.dsl.dom.model.impl.CastFunctionImpl#getName Name}
  • *
*

* * @generated */ public class CastFunctionImpl extends ExpressionImpl implements CastFunction { /** * The default value of the '{@link #getFunction() Function}' attribute. * * * @see #getFunction() * @generated * @ordered */ protected static final String FUNCTION_EDEFAULT = null; /** * The cached value of the '{@link #getFunction() Function}' attribute. * * * @see #getFunction() * @generated * @ordered */ protected String function = FUNCTION_EDEFAULT; /** * The cached value of the '{@link #getFrom() From}' containment reference. * * * @see #getFrom() * @generated * @ordered */ protected Expression from; /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * * * @generated */ protected CastFunctionImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DomPackage.Literals.CAST_FUNCTION; } /** * * * @generated */ public String getFunction() { return function; } /** * * * @generated */ public void setFunction(String newFunction) { String oldFunction = function; function = newFunction; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.CAST_FUNCTION__FUNCTION, oldFunction, function)); } /** * * * @generated */ public Expression getFrom() { return from; } /** * * * @generated */ public NotificationChain basicSetFrom(Expression newFrom, NotificationChain msgs) { Expression oldFrom = from; from = newFrom; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.CAST_FUNCTION__FROM, oldFrom, newFrom); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setFrom(Expression newFrom) { if (newFrom != from) { NotificationChain msgs = null; if (from != null) msgs = ((InternalEObject)from).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.CAST_FUNCTION__FROM, null, msgs); if (newFrom != null) msgs = ((InternalEObject)newFrom).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.CAST_FUNCTION__FROM, null, msgs); msgs = basicSetFrom(newFrom, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.CAST_FUNCTION__FROM, newFrom, newFrom)); } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.CAST_FUNCTION__NAME, oldName, name)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DomPackage.CAST_FUNCTION__FROM: return basicSetFrom(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DomPackage.CAST_FUNCTION__FUNCTION: return getFunction(); case DomPackage.CAST_FUNCTION__FROM: return getFrom(); case DomPackage.CAST_FUNCTION__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DomPackage.CAST_FUNCTION__FUNCTION: setFunction((String)newValue); return; case DomPackage.CAST_FUNCTION__FROM: setFrom((Expression)newValue); return; case DomPackage.CAST_FUNCTION__NAME: setName((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DomPackage.CAST_FUNCTION__FUNCTION: setFunction(FUNCTION_EDEFAULT); return; case DomPackage.CAST_FUNCTION__FROM: setFrom((Expression)null); return; case DomPackage.CAST_FUNCTION__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DomPackage.CAST_FUNCTION__FUNCTION: return FUNCTION_EDEFAULT == null ? function != null : !FUNCTION_EDEFAULT.equals(function); case DomPackage.CAST_FUNCTION__FROM: return from != null; case DomPackage.CAST_FUNCTION__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (function: "); result.append(function); result.append(", name: "); result.append(name); result.append(')'); return result.toString(); } } //CastFunctionImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy