org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationDelegateImpl Maven / Gradle / Ivy
/**
* generated by Xtext 2.20.0
*/
package org.contextmapper.tactic.dsl.tacticdsl.impl;
import org.contextmapper.tactic.dsl.tacticdsl.ServiceOperationDelegate;
import org.contextmapper.tactic.dsl.tacticdsl.ServiceRepositoryOperationOption;
import org.contextmapper.tactic.dsl.tacticdsl.ServiceRepositoryOption;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;
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.MinimalEObjectImpl;
/**
*
* An implementation of the model object 'Service Operation Delegate'.
*
*
* The following features are implemented:
*
*
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationDelegateImpl#getDelegate Delegate}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.ServiceOperationDelegateImpl#getDelegateOperation Delegate Operation}
*
*
* @generated
*/
public class ServiceOperationDelegateImpl extends MinimalEObjectImpl.Container implements ServiceOperationDelegate
{
/**
* The cached value of the '{@link #getDelegate() Delegate}' reference.
*
*
* @see #getDelegate()
* @generated
* @ordered
*/
protected ServiceRepositoryOption delegate;
/**
* The cached value of the '{@link #getDelegateOperation() Delegate Operation}' reference.
*
*
* @see #getDelegateOperation()
* @generated
* @ordered
*/
protected ServiceRepositoryOperationOption delegateOperation;
/**
*
*
* @generated
*/
protected ServiceOperationDelegateImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return TacticdslPackage.Literals.SERVICE_OPERATION_DELEGATE;
}
/**
*
*
* @generated
*/
public ServiceRepositoryOption getDelegate()
{
if (delegate != null && delegate.eIsProxy())
{
InternalEObject oldDelegate = (InternalEObject)delegate;
delegate = (ServiceRepositoryOption)eResolveProxy(oldDelegate);
if (delegate != oldDelegate)
{
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE, oldDelegate, delegate));
}
}
return delegate;
}
/**
*
*
* @generated
*/
public ServiceRepositoryOption basicGetDelegate()
{
return delegate;
}
/**
*
*
* @generated
*/
public void setDelegate(ServiceRepositoryOption newDelegate)
{
ServiceRepositoryOption oldDelegate = delegate;
delegate = newDelegate;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE, oldDelegate, delegate));
}
/**
*
*
* @generated
*/
public ServiceRepositoryOperationOption getDelegateOperation()
{
if (delegateOperation != null && delegateOperation.eIsProxy())
{
InternalEObject oldDelegateOperation = (InternalEObject)delegateOperation;
delegateOperation = (ServiceRepositoryOperationOption)eResolveProxy(oldDelegateOperation);
if (delegateOperation != oldDelegateOperation)
{
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE_OPERATION, oldDelegateOperation, delegateOperation));
}
}
return delegateOperation;
}
/**
*
*
* @generated
*/
public ServiceRepositoryOperationOption basicGetDelegateOperation()
{
return delegateOperation;
}
/**
*
*
* @generated
*/
public void setDelegateOperation(ServiceRepositoryOperationOption newDelegateOperation)
{
ServiceRepositoryOperationOption oldDelegateOperation = delegateOperation;
delegateOperation = newDelegateOperation;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE_OPERATION, oldDelegateOperation, delegateOperation));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE:
if (resolve) return getDelegate();
return basicGetDelegate();
case TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE_OPERATION:
if (resolve) return getDelegateOperation();
return basicGetDelegateOperation();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE:
setDelegate((ServiceRepositoryOption)newValue);
return;
case TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE_OPERATION:
setDelegateOperation((ServiceRepositoryOperationOption)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE:
setDelegate((ServiceRepositoryOption)null);
return;
case TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE_OPERATION:
setDelegateOperation((ServiceRepositoryOperationOption)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE:
return delegate != null;
case TacticdslPackage.SERVICE_OPERATION_DELEGATE__DELEGATE_OPERATION:
return delegateOperation != null;
}
return super.eIsSet(featureID);
}
} //ServiceOperationDelegateImpl