blob: 9349414e544c9b8c48332c460c9bbf7bad1c1d7b [file] [log] [blame]
/**
*/
package org.eclipse.upr.bpmnprof.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.uml2.uml.CallEvent;
import org.eclipse.upr.bpmnprof.BpmnprofPackage;
import org.eclipse.upr.bpmnprof.ErrorEventDefinition;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Error Event Definition</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.upr.bpmnprof.impl.ErrorEventDefinitionImpl#getErrorRef <em>Error Ref</em>}</li>
* <li>{@link org.eclipse.upr.bpmnprof.impl.ErrorEventDefinitionImpl#getBase_CallEvent <em>Base Call Event</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ErrorEventDefinitionImpl extends EventDefinitionImpl implements ErrorEventDefinition {
/**
* The cached value of the '{@link #getErrorRef() <em>Error Ref</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getErrorRef()
* @generated
* @ordered
*/
protected org.eclipse.upr.bpmnprof.Error errorRef;
/**
* The cached value of the '{@link #getBase_CallEvent() <em>Base Call Event</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_CallEvent()
* @generated
* @ordered
*/
protected CallEvent base_CallEvent;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ErrorEventDefinitionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpmnprofPackage.eINSTANCE.getErrorEventDefinition();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.upr.bpmnprof.Error getErrorRef() {
if (errorRef != null && errorRef.eIsProxy()) {
InternalEObject oldErrorRef = (InternalEObject)errorRef;
errorRef = (org.eclipse.upr.bpmnprof.Error)eResolveProxy(oldErrorRef);
if (errorRef != oldErrorRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BpmnprofPackage.ERROR_EVENT_DEFINITION__ERROR_REF, oldErrorRef, errorRef));
}
}
return errorRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.upr.bpmnprof.Error basicGetErrorRef() {
return errorRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setErrorRef(org.eclipse.upr.bpmnprof.Error newErrorRef) {
org.eclipse.upr.bpmnprof.Error oldErrorRef = errorRef;
errorRef = newErrorRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpmnprofPackage.ERROR_EVENT_DEFINITION__ERROR_REF, oldErrorRef, errorRef));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CallEvent getBase_CallEvent() {
if (base_CallEvent != null && base_CallEvent.eIsProxy()) {
InternalEObject oldBase_CallEvent = (InternalEObject)base_CallEvent;
base_CallEvent = (CallEvent)eResolveProxy(oldBase_CallEvent);
if (base_CallEvent != oldBase_CallEvent) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BpmnprofPackage.ERROR_EVENT_DEFINITION__BASE_CALL_EVENT, oldBase_CallEvent, base_CallEvent));
}
}
return base_CallEvent;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CallEvent basicGetBase_CallEvent() {
return base_CallEvent;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setBase_CallEvent(CallEvent newBase_CallEvent) {
CallEvent oldBase_CallEvent = base_CallEvent;
base_CallEvent = newBase_CallEvent;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpmnprofPackage.ERROR_EVENT_DEFINITION__BASE_CALL_EVENT, oldBase_CallEvent, base_CallEvent));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpmnprofPackage.ERROR_EVENT_DEFINITION__ERROR_REF:
if (resolve) return getErrorRef();
return basicGetErrorRef();
case BpmnprofPackage.ERROR_EVENT_DEFINITION__BASE_CALL_EVENT:
if (resolve) return getBase_CallEvent();
return basicGetBase_CallEvent();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpmnprofPackage.ERROR_EVENT_DEFINITION__ERROR_REF:
setErrorRef((org.eclipse.upr.bpmnprof.Error)newValue);
return;
case BpmnprofPackage.ERROR_EVENT_DEFINITION__BASE_CALL_EVENT:
setBase_CallEvent((CallEvent)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpmnprofPackage.ERROR_EVENT_DEFINITION__ERROR_REF:
setErrorRef((org.eclipse.upr.bpmnprof.Error)null);
return;
case BpmnprofPackage.ERROR_EVENT_DEFINITION__BASE_CALL_EVENT:
setBase_CallEvent((CallEvent)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpmnprofPackage.ERROR_EVENT_DEFINITION__ERROR_REF:
return errorRef != null;
case BpmnprofPackage.ERROR_EVENT_DEFINITION__BASE_CALL_EVENT:
return base_CallEvent != null;
}
return super.eIsSet(featureID);
}
} //ErrorEventDefinitionImpl