blob: 667c626564b2560391846ec8219f1c9a09395de8 [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.bpmn.impl;
import java.util.Collection;
import javax.xml.namespace.QName;
import org.eclipse.bpmn.BpmnPackage;
import org.eclipse.bpmn.ChoreographyTask;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.util.EDataTypeEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Choreography Task</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.bpmn.impl.ChoreographyTaskImpl#getMessageFlowRef <em>Message Flow Ref</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ChoreographyTaskImpl extends ChoreographyActivityImpl implements
ChoreographyTask {
/**
* The cached value of the '{@link #getMessageFlowRef() <em>Message Flow Ref</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMessageFlowRef()
* @generated
* @ordered
*/
protected EList<QName> messageFlowRef;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ChoreographyTaskImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpmnPackage.eINSTANCE.getChoreographyTask();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<QName> getMessageFlowRef() {
if (messageFlowRef == null) {
messageFlowRef = new EDataTypeEList<QName>(QName.class, this,
BpmnPackage.CHOREOGRAPHY_TASK__MESSAGE_FLOW_REF);
}
return messageFlowRef;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpmnPackage.CHOREOGRAPHY_TASK__MESSAGE_FLOW_REF:
return getMessageFlowRef();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpmnPackage.CHOREOGRAPHY_TASK__MESSAGE_FLOW_REF:
getMessageFlowRef().clear();
getMessageFlowRef().addAll((Collection<? extends QName>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpmnPackage.CHOREOGRAPHY_TASK__MESSAGE_FLOW_REF:
getMessageFlowRef().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpmnPackage.CHOREOGRAPHY_TASK__MESSAGE_FLOW_REF:
return messageFlowRef != null && !messageFlowRef.isEmpty();
}
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(" (messageFlowRef: "); //$NON-NLS-1$
result.append(messageFlowRef);
result.append(')');
return result.toString();
}
} //ChoreographyTaskImpl