blob: bd5b926f95248a9f92dddbf3a499a8b4e4cd8778 [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 org.eclipse.bpmn.BpmnPackage;
import org.eclipse.bpmn.ExclusiveGateway;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Exclusive Gateway</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.bpmn.impl.ExclusiveGatewayImpl#getDefault <em>Default</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ExclusiveGatewayImpl extends GatewayImpl implements
ExclusiveGateway {
/**
* The default value of the '{@link #getDefault() <em>Default</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDefault()
* @generated
* @ordered
*/
protected static final String DEFAULT_EDEFAULT = null;
/**
* The cached value of the '{@link #getDefault() <em>Default</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDefault()
* @generated
* @ordered
*/
protected String default_ = DEFAULT_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ExclusiveGatewayImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpmnPackage.eINSTANCE.getExclusiveGateway();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getDefault() {
return default_;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDefault(String newDefault) {
String oldDefault = default_;
default_ = newDefault;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
BpmnPackage.EXCLUSIVE_GATEWAY__DEFAULT, oldDefault,
default_));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpmnPackage.EXCLUSIVE_GATEWAY__DEFAULT:
return getDefault();
}
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.EXCLUSIVE_GATEWAY__DEFAULT:
setDefault((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpmnPackage.EXCLUSIVE_GATEWAY__DEFAULT:
setDefault(DEFAULT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpmnPackage.EXCLUSIVE_GATEWAY__DEFAULT:
return DEFAULT_EDEFAULT == null ? default_ != null
: !DEFAULT_EDEFAULT.equals(default_);
}
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(" (default: "); //$NON-NLS-1$
result.append(default_);
result.append(')');
return result.toString();
}
} //ExclusiveGatewayImpl