org.eclipse.bpmn2.impl.EventBasedGatewayImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Kie Workbench - Common - Stunner - BPMN Definition Set - GWT Support for Eclipse EMF/XMI
/**
*
*
* Copyright (c) 2010 SAP AG.
* 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:
* Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation
*
*
*/
package org.eclipse.bpmn2.impl;
import com.google.gwt.user.client.rpc.GwtTransient;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.EventBasedGateway;
import org.eclipse.bpmn2.EventBasedGatewayType;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Event Based Gateway'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.bpmn2.impl.EventBasedGatewayImpl#getEventGatewayType Event Gateway Type}
* - {@link org.eclipse.bpmn2.impl.EventBasedGatewayImpl#isInstantiate Instantiate}
*
*
* @generated
*/
public class EventBasedGatewayImpl extends GatewayImpl implements EventBasedGateway {
/**
* The default value of the '{@link #getEventGatewayType() Event Gateway Type}' attribute.
*
*
* @see #getEventGatewayType()
* @generated
* @ordered
*/
protected static final EventBasedGatewayType EVENT_GATEWAY_TYPE_EDEFAULT = EventBasedGatewayType.PARALLEL;
/**
* The cached value of the '{@link #getEventGatewayType() Event Gateway Type}' attribute.
*
*
* @see #getEventGatewayType()
* @generated
* @ordered
*/
@GwtTransient
protected EventBasedGatewayType eventGatewayType = EVENT_GATEWAY_TYPE_EDEFAULT;
/**
* The default value of the '{@link #isInstantiate() Instantiate}' attribute.
*
*
* @see #isInstantiate()
* @generated
* @ordered
*/
protected static final boolean INSTANTIATE_EDEFAULT = false;
/**
* The cached value of the '{@link #isInstantiate() Instantiate}' attribute.
*
*
* @see #isInstantiate()
* @generated
* @ordered
*/
@GwtTransient
protected boolean instantiate = INSTANTIATE_EDEFAULT;
/**
*
*
* @generated
*/
protected EventBasedGatewayImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.Literals.EVENT_BASED_GATEWAY;
}
/**
*
*
* @generated
*/
@Override
public EventBasedGatewayType getEventGatewayType() {
return eventGatewayType;
}
/**
*
*
* @generated
*/
@Override
public void setEventGatewayType(EventBasedGatewayType newEventGatewayType) {
EventBasedGatewayType oldEventGatewayType = eventGatewayType;
eventGatewayType = newEventGatewayType == null ? EVENT_GATEWAY_TYPE_EDEFAULT : newEventGatewayType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EVENT_BASED_GATEWAY__EVENT_GATEWAY_TYPE,
oldEventGatewayType, eventGatewayType));
}
/**
*
*
* @generated
*/
@Override
public boolean isInstantiate() {
return instantiate;
}
/**
*
*
* @generated
*/
@Override
public void setInstantiate(boolean newInstantiate) {
boolean oldInstantiate = instantiate;
instantiate = newInstantiate;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EVENT_BASED_GATEWAY__INSTANTIATE,
oldInstantiate, instantiate));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Bpmn2Package.EVENT_BASED_GATEWAY__EVENT_GATEWAY_TYPE:
return getEventGatewayType();
case Bpmn2Package.EVENT_BASED_GATEWAY__INSTANTIATE:
return isInstantiate();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Bpmn2Package.EVENT_BASED_GATEWAY__EVENT_GATEWAY_TYPE:
setEventGatewayType((EventBasedGatewayType) newValue);
return;
case Bpmn2Package.EVENT_BASED_GATEWAY__INSTANTIATE:
setInstantiate((Boolean) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Bpmn2Package.EVENT_BASED_GATEWAY__EVENT_GATEWAY_TYPE:
setEventGatewayType(EVENT_GATEWAY_TYPE_EDEFAULT);
return;
case Bpmn2Package.EVENT_BASED_GATEWAY__INSTANTIATE:
setInstantiate(INSTANTIATE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Bpmn2Package.EVENT_BASED_GATEWAY__EVENT_GATEWAY_TYPE:
return eventGatewayType != EVENT_GATEWAY_TYPE_EDEFAULT;
case Bpmn2Package.EVENT_BASED_GATEWAY__INSTANTIATE:
return instantiate != INSTANTIATE_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (eventGatewayType: ");
result.append(eventGatewayType);
result.append(", instantiate: ");
result.append(instantiate);
result.append(')');
return result.toString();
}
} //EventBasedGatewayImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy