bpsim.impl.CostParametersImpl 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
/**
*/
package bpsim.impl;
import bpsim.BpsimPackage;
import bpsim.CostParameters;
import bpsim.Parameter;
import com.google.gwt.user.client.rpc.GwtTransient;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
/**
*
* An implementation of the model object 'Cost Parameters'.
*
*
* The following features are implemented:
*
*
* - {@link bpsim.impl.CostParametersImpl#getFixedCost Fixed Cost}
* - {@link bpsim.impl.CostParametersImpl#getUnitCost Unit Cost}
*
*
* @generated
*/
public class CostParametersImpl extends EObjectImpl implements CostParameters {
/**
* The cached value of the '{@link #getFixedCost() Fixed Cost}' containment reference.
*
*
* @see #getFixedCost()
* @generated
* @ordered
*/
@GwtTransient
protected Parameter fixedCost;
/**
* The cached value of the '{@link #getUnitCost() Unit Cost}' containment reference.
*
*
* @see #getUnitCost()
* @generated
* @ordered
*/
@GwtTransient
protected Parameter unitCost;
/**
*
*
* @generated
*/
protected CostParametersImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpsimPackage.Literals.COST_PARAMETERS;
}
/**
*
*
* @generated
*/
@Override
public Parameter getFixedCost() {
return fixedCost;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetFixedCost(Parameter newFixedCost, NotificationChain msgs) {
Parameter oldFixedCost = fixedCost;
fixedCost = newFixedCost;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BpsimPackage.COST_PARAMETERS__FIXED_COST, oldFixedCost, newFixedCost);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
@Override
public void setFixedCost(Parameter newFixedCost) {
if (newFixedCost != fixedCost) {
NotificationChain msgs = null;
if (fixedCost != null)
msgs = ((InternalEObject)fixedCost).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - BpsimPackage.COST_PARAMETERS__FIXED_COST, null, msgs);
if (newFixedCost != null)
msgs = ((InternalEObject)newFixedCost).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - BpsimPackage.COST_PARAMETERS__FIXED_COST, null, msgs);
msgs = basicSetFixedCost(newFixedCost, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.COST_PARAMETERS__FIXED_COST, newFixedCost, newFixedCost));
}
/**
*
*
* @generated
*/
@Override
public Parameter getUnitCost() {
return unitCost;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetUnitCost(Parameter newUnitCost, NotificationChain msgs) {
Parameter oldUnitCost = unitCost;
unitCost = newUnitCost;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BpsimPackage.COST_PARAMETERS__UNIT_COST, oldUnitCost, newUnitCost);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
@Override
public void setUnitCost(Parameter newUnitCost) {
if (newUnitCost != unitCost) {
NotificationChain msgs = null;
if (unitCost != null)
msgs = ((InternalEObject)unitCost).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - BpsimPackage.COST_PARAMETERS__UNIT_COST, null, msgs);
if (newUnitCost != null)
msgs = ((InternalEObject)newUnitCost).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - BpsimPackage.COST_PARAMETERS__UNIT_COST, null, msgs);
msgs = basicSetUnitCost(newUnitCost, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.COST_PARAMETERS__UNIT_COST, newUnitCost, newUnitCost));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BpsimPackage.COST_PARAMETERS__FIXED_COST:
return basicSetFixedCost(null, msgs);
case BpsimPackage.COST_PARAMETERS__UNIT_COST:
return basicSetUnitCost(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpsimPackage.COST_PARAMETERS__FIXED_COST:
return getFixedCost();
case BpsimPackage.COST_PARAMETERS__UNIT_COST:
return getUnitCost();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpsimPackage.COST_PARAMETERS__FIXED_COST:
setFixedCost((Parameter)newValue);
return;
case BpsimPackage.COST_PARAMETERS__UNIT_COST:
setUnitCost((Parameter)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpsimPackage.COST_PARAMETERS__FIXED_COST:
setFixedCost((Parameter)null);
return;
case BpsimPackage.COST_PARAMETERS__UNIT_COST:
setUnitCost((Parameter)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpsimPackage.COST_PARAMETERS__FIXED_COST:
return fixedCost != null;
case BpsimPackage.COST_PARAMETERS__UNIT_COST:
return unitCost != null;
}
return super.eIsSet(featureID);
}
} //CostParametersImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy