/*
 * This file has been developed at the University of Munich, Chair for Programming & Software Engineering.
 * 
 * This file is licensed under the Eclipse Public License (EPL) 1.0
 * 
 */
package eu.mdd4soa.smm.data.impl;

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;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import eu.mdd4soa.smm.data.ISMDataPackage;
import eu.mdd4soa.smm.data.InteractionParameter;
import eu.mdd4soa.smm.statik.InterfaceParameter;

/**
 * <!-- begin-user-doc --> An implementation of the model object '
 * <em><b>Interaction Parameter</b></em>'. <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 * <li>
 * {@link eu.mdd4soa.smm.data.impl.InteractionParameterImpl#getOperationParameter
 * <em>Operation Parameter</em>}</li>
 * </ul>
 * </p>
 * 
 * @generated
 */
public abstract class InteractionParameterImpl extends EObjectImpl implements InteractionParameter {
	/**
	 * The cached value of the '{@link #getOperationParameter()
	 * <em>Operation Parameter</em>}' reference. <!-- begin-user-doc --> <!--
	 * end-user-doc -->
	 * 
	 * @see #getOperationParameter()
	 * @generated
	 * @ordered
	 */
	protected InterfaceParameter operationParameter;

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	protected InteractionParameterImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ISMDataPackage.Literals.INTERACTION_PARAMETER;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	public InterfaceParameter getOperationParameter() {
		if (operationParameter != null && operationParameter.eIsProxy()) {
			InternalEObject oldOperationParameter= (InternalEObject) operationParameter;
			operationParameter= (InterfaceParameter) eResolveProxy(oldOperationParameter);
			if (operationParameter != oldOperationParameter) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ISMDataPackage.INTERACTION_PARAMETER__OPERATION_PARAMETER,
							oldOperationParameter, operationParameter));
			}
		}
		return operationParameter;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	public InterfaceParameter basicGetOperationParameter() {
		return operationParameter;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	public void setOperationParameter(InterfaceParameter newOperationParameter) {
		InterfaceParameter oldOperationParameter= operationParameter;
		operationParameter= newOperationParameter;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ISMDataPackage.INTERACTION_PARAMETER__OPERATION_PARAMETER, oldOperationParameter,
					operationParameter));
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case ISMDataPackage.INTERACTION_PARAMETER__OPERATION_PARAMETER:
				if (resolve)
					return getOperationParameter();
				return basicGetOperationParameter();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case ISMDataPackage.INTERACTION_PARAMETER__OPERATION_PARAMETER:
				setOperationParameter((InterfaceParameter) newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case ISMDataPackage.INTERACTION_PARAMETER__OPERATION_PARAMETER:
				setOperationParameter((InterfaceParameter) null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case ISMDataPackage.INTERACTION_PARAMETER__OPERATION_PARAMETER:
				return operationParameter != null;
		}
		return super.eIsSet(featureID);
	}

} // InteractionParameterImpl
