/** * <copyright> * </copyright> * * $Id: StatusValueProxyImpl.java,v 1.2 2011/03/05 21:48:55 auhl Exp $ */ package behavioral.status_and_action.assembly.impl; import behavioral.status_and_action.assembly.AssemblyPackage; import behavioral.status_and_action.assembly.StatusValueProxy; import behavioral.status_and_action.design.StatusValue; import behavioral.status_and_action.design.impl.AbstractStatusValueImpl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Status Value Proxy</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link behavioral.status_and_action.assembly.impl.StatusValueProxyImpl#getValue <em>Value</em>}</li> * </ul> * </p> * * @generated */ public class StatusValueProxyImpl extends AbstractStatusValueImpl implements StatusValueProxy { /** * The cached value of the '{@link #getValue() <em>Value</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getValue() * @generated * @ordered */ protected StatusValue value; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected StatusValueProxyImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return AssemblyPackage.Literals.STATUS_VALUE_PROXY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public StatusValue getValue() { if (value != null && value.eIsProxy()) { InternalEObject oldValue = (InternalEObject)value; value = (StatusValue)eResolveProxy(oldValue); if (value != oldValue) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, AssemblyPackage.STATUS_VALUE_PROXY__VALUE, oldValue, value)); } } return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public StatusValue basicGetValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setValue(StatusValue newValue) { StatusValue oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AssemblyPackage.STATUS_VALUE_PROXY__VALUE, oldValue, value)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AssemblyPackage.STATUS_VALUE_PROXY__VALUE: if (resolve) return getValue(); return basicGetValue(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case AssemblyPackage.STATUS_VALUE_PROXY__VALUE: setValue((StatusValue)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case AssemblyPackage.STATUS_VALUE_PROXY__VALUE: setValue((StatusValue)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case AssemblyPackage.STATUS_VALUE_PROXY__VALUE: return value != null; } return super.eIsSet(featureID); } } //StatusValueProxyImpl