org.eclipse.bpmn2.impl.TransactionImpl 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.Transaction;
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 'Transaction'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.bpmn2.impl.TransactionImpl#getProtocol Protocol}
* - {@link org.eclipse.bpmn2.impl.TransactionImpl#getMethod Method}
*
*
* @generated
*/
public class TransactionImpl extends SubProcessImpl implements Transaction {
/**
* The default value of the '{@link #getProtocol() Protocol}' attribute.
*
*
* @see #getProtocol()
* @generated
* @ordered
*/
protected static final String PROTOCOL_EDEFAULT = null;
/**
* The cached value of the '{@link #getProtocol() Protocol}' attribute.
*
*
* @see #getProtocol()
* @generated
* @ordered
*/
@GwtTransient
protected String protocol = PROTOCOL_EDEFAULT;
/**
* The default value of the '{@link #getMethod() Method}' attribute.
*
*
* @see #getMethod()
* @generated
* @ordered
*/
protected static final String METHOD_EDEFAULT = null;
/**
* The cached value of the '{@link #getMethod() Method}' attribute.
*
*
* @see #getMethod()
* @generated
* @ordered
*/
@GwtTransient
protected String method = METHOD_EDEFAULT;
/**
*
*
* @generated
*/
protected TransactionImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.Literals.TRANSACTION;
}
/**
*
*
* @generated
*/
@Override
public String getProtocol() {
return protocol;
}
/**
*
*
* @generated
*/
@Override
public void setProtocol(String newProtocol) {
String oldProtocol = protocol;
protocol = newProtocol;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.TRANSACTION__PROTOCOL, oldProtocol,
protocol));
}
/**
*
*
* @generated
*/
@Override
public String getMethod() {
return method;
}
/**
*
*
* @generated
*/
@Override
public void setMethod(String newMethod) {
String oldMethod = method;
method = newMethod;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.TRANSACTION__METHOD, oldMethod, method));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Bpmn2Package.TRANSACTION__PROTOCOL:
return getProtocol();
case Bpmn2Package.TRANSACTION__METHOD:
return getMethod();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Bpmn2Package.TRANSACTION__PROTOCOL:
setProtocol((String) newValue);
return;
case Bpmn2Package.TRANSACTION__METHOD:
setMethod((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Bpmn2Package.TRANSACTION__PROTOCOL:
setProtocol(PROTOCOL_EDEFAULT);
return;
case Bpmn2Package.TRANSACTION__METHOD:
setMethod(METHOD_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Bpmn2Package.TRANSACTION__PROTOCOL:
return PROTOCOL_EDEFAULT == null ? protocol != null : !PROTOCOL_EDEFAULT.equals(protocol);
case Bpmn2Package.TRANSACTION__METHOD:
return METHOD_EDEFAULT == null ? method != null : !METHOD_EDEFAULT.equals(method);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (protocol: ");
result.append(protocol);
result.append(", method: ");
result.append(method);
result.append(')');
return result.toString();
}
} //TransactionImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy