blob: 6283ee14c9fcaaa5f4cd0b62d0454c49ee37bab7 [file] [log] [blame]
/**
* Copyright (c) 2000-2009, Intalio Inc.
* 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:
* Intalio Inc. - initial API and implementation
*
*/
package org.eclipse.mdt.bpmn.impl;
import javax.xml.namespace.QName;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.mdt.bpmn.BpmnPackage;
import org.eclipse.mdt.bpmn.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.mdt.bpmn.impl.MessageEventDefinitionImpl#getOperationRef <em>Operation Ref</em>}</li>
* <li>{@link org.eclipse.mdt.bpmn.impl.MessageEventDefinitionImpl#getMessageRef <em>Message Ref</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class MessageEventDefinitionImpl extends EventDefinitionImpl implements
MessageEventDefinition {
/**
* The default value of the '{@link #getOperationRef() <em>Operation Ref</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOperationRef()
* @generated
* @ordered
*/
protected static final QName OPERATION_REF_EDEFAULT = null;
/**
* The cached value of the '{@link #getOperationRef() <em>Operation Ref</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOperationRef()
* @generated
* @ordered
*/
protected QName operationRef = OPERATION_REF_EDEFAULT;
/**
* The default value of the '{@link #getMessageRef() <em>Message Ref</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMessageRef()
* @generated
* @ordered
*/
protected static final QName MESSAGE_REF_EDEFAULT = null;
/**
* The cached value of the '{@link #getMessageRef() <em>Message Ref</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMessageRef()
* @generated
* @ordered
*/
protected QName messageRef = MESSAGE_REF_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MessageEventDefinitionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpmnPackage.eINSTANCE.getMessageEventDefinition();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public QName getOperationRef() {
return operationRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOperationRef(QName newOperationRef) {
QName oldOperationRef = operationRef;
operationRef = newOperationRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BpmnPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF,
oldOperationRef, operationRef));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public QName getMessageRef() {
return messageRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMessageRef(QName newMessageRef) {
QName oldMessageRef = messageRef;
messageRef = newMessageRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BpmnPackage.MESSAGE_EVENT_DEFINITION__MESSAGE_REF,
oldMessageRef, messageRef));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpmnPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF:
return getOperationRef();
case BpmnPackage.MESSAGE_EVENT_DEFINITION__MESSAGE_REF:
return getMessageRef();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpmnPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF:
setOperationRef((QName) newValue);
return;
case BpmnPackage.MESSAGE_EVENT_DEFINITION__MESSAGE_REF:
setMessageRef((QName) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpmnPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF:
setOperationRef(OPERATION_REF_EDEFAULT);
return;
case BpmnPackage.MESSAGE_EVENT_DEFINITION__MESSAGE_REF:
setMessageRef(MESSAGE_REF_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpmnPackage.MESSAGE_EVENT_DEFINITION__OPERATION_REF:
return OPERATION_REF_EDEFAULT == null ? operationRef != null
: !OPERATION_REF_EDEFAULT.equals(operationRef);
case BpmnPackage.MESSAGE_EVENT_DEFINITION__MESSAGE_REF:
return MESSAGE_REF_EDEFAULT == null ? messageRef != null
: !MESSAGE_REF_EDEFAULT.equals(messageRef);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (operationRef: "); //$NON-NLS-1$
result.append(operationRef);
result.append(", messageRef: "); //$NON-NLS-1$
result.append(messageRef);
result.append(')');
return result.toString();
}
} //MessageEventDefinitionImpl