blob: e2a7f20e7004cd0295445a1eef236767cf2dbbbb [file] [log] [blame]
/**
* Copyright (c) 2014 Fraunhofer FOKUS
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Max Bureck
*/
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.BPMNMessage;
import org.eclipse.upr.bpmnprof.BPMNOperation;
import org.eclipse.upr.bpmnprof.BpmnprofPackage;
import org.eclipse.upr.bpmnprof.MessageEventDefinition;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Message Event Definition</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.upr.bpmnprof.impl.MessageEventDefinitionImpl#getMessageRef <em>Message Ref</em>}</li>
* <li>{@link org.eclipse.upr.bpmnprof.impl.MessageEventDefinitionImpl#getOperationRef <em>Operation Ref</em>}</li>
* <li>{@link org.eclipse.upr.bpmnprof.impl.MessageEventDefinitionImpl#getBase_CallEvent <em>Base Call Event</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class MessageEventDefinitionImpl extends EventDefinitionImpl implements MessageEventDefinition {
/**
* The cached value of the '{@link #getMessageRef() <em>Message Ref</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMessageRef()
* @generated
* @ordered
*/
protected BPMNMessage messageRef;
/**
* The cached value of the '{@link #getOperationRef() <em>Operation Ref</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOperationRef()
* @generated
* @ordered
*/
protected BPMNOperation operationRef;
/**
* 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 MessageEventDefinitionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpmnprofPackage.eINSTANCE.getMessageEventDefinition();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BPMNMessage getMessageRef() {
if (messageRef != null && messageRef.eIsProxy()) {
InternalEObject oldMessageRef = (InternalEObject)messageRef;
messageRef = (BPMNMessage)eResolveProxy(oldMessageRef);
if (messageRef != oldMessageRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BpmnprofPackage.MESSAGE_EVENT_DEFINITION__MESSAGE_REF, oldMessageRef, messageRef));
}
}
return messageRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BPMNMessage basicGetMessageRef() {
return messageRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMessageRef(BPMNMessage newMessageRef) {
BPMNMessage oldMessageRef = messageRef;
messageRef = newMessageRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpmnprofPackage.MESSAGE_EVENT_DEFINITION__MESSAGE_REF, oldMessageRef, messageRef));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BPMNOperation getOperationRef() {
if (operationRef != null && operationRef.eIsProxy()) {
InternalEObject oldOperationRef = (InternalEObject)operationRef;
operationRef = (BPMNOperation)eResolveProxy(oldOperationRef);
if (operationRef != oldOperationRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BpmnprofPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF, oldOperationRef, operationRef));
}
}
return operationRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BPMNOperation basicGetOperationRef() {
return operationRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOperationRef(BPMNOperation newOperationRef) {
BPMNOperation oldOperationRef = operationRef;
operationRef = newOperationRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpmnprofPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF, oldOperationRef, operationRef));
}
/**
* <!-- 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.MESSAGE_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.MESSAGE_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.MESSAGE_EVENT_DEFINITION__MESSAGE_REF:
if (resolve) return getMessageRef();
return basicGetMessageRef();
case BpmnprofPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF:
if (resolve) return getOperationRef();
return basicGetOperationRef();
case BpmnprofPackage.MESSAGE_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.MESSAGE_EVENT_DEFINITION__MESSAGE_REF:
setMessageRef((BPMNMessage)newValue);
return;
case BpmnprofPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF:
setOperationRef((BPMNOperation)newValue);
return;
case BpmnprofPackage.MESSAGE_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.MESSAGE_EVENT_DEFINITION__MESSAGE_REF:
setMessageRef((BPMNMessage)null);
return;
case BpmnprofPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF:
setOperationRef((BPMNOperation)null);
return;
case BpmnprofPackage.MESSAGE_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.MESSAGE_EVENT_DEFINITION__MESSAGE_REF:
return messageRef != null;
case BpmnprofPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF:
return operationRef != null;
case BpmnprofPackage.MESSAGE_EVENT_DEFINITION__BASE_CALL_EVENT:
return base_CallEvent != null;
}
return super.eIsSet(featureID);
}
} //MessageEventDefinitionImpl