All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bpsim.impl.ParameterImpl Maven / Gradle / Ivy

There is a newer version: 7.54.0.Final
Show newest version
/**
 */
package bpsim.impl;

import bpsim.BpsimPackage;
import bpsim.Parameter;
import bpsim.ParameterValue;
import bpsim.ResultType;

import com.google.gwt.user.client.rpc.GwtTransient;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

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;

import org.eclipse.emf.ecore.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.EDataTypeEList;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * 
 * An implementation of the model object 'Parameter'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link bpsim.impl.ParameterImpl#getResultRequest Result Request}
  • *
  • {@link bpsim.impl.ParameterImpl#getParameterValueGroup Parameter Value Group}
  • *
  • {@link bpsim.impl.ParameterImpl#getParameterValue Parameter Value}
  • *
  • {@link bpsim.impl.ParameterImpl#isKpi Kpi}
  • *
  • {@link bpsim.impl.ParameterImpl#isSla Sla}
  • *
* * @generated */ public class ParameterImpl extends EObjectImpl implements Parameter { /** * The cached value of the '{@link #getResultRequest() Result Request}' attribute list. * * * @see #getResultRequest() * @generated * @ordered */ @GwtTransient protected EList resultRequest; /** * The cached value of the '{@link #getParameterValueGroup() Parameter Value Group}' attribute list. * * * @see #getParameterValueGroup() * @generated * @ordered */ @GwtTransient protected FeatureMap parameterValueGroup; /** * The default value of the '{@link #isKpi() Kpi}' attribute. * * * @see #isKpi() * @generated * @ordered */ protected static final boolean KPI_EDEFAULT = false; /** * The cached value of the '{@link #isKpi() Kpi}' attribute. * * * @see #isKpi() * @generated * @ordered */ @GwtTransient protected boolean kpi = KPI_EDEFAULT; /** * This is true if the Kpi attribute has been set. * * * @generated * @ordered */ @GwtTransient protected boolean kpiESet; /** * The default value of the '{@link #isSla() Sla}' attribute. * * * @see #isSla() * @generated * @ordered */ protected static final boolean SLA_EDEFAULT = false; /** * The cached value of the '{@link #isSla() Sla}' attribute. * * * @see #isSla() * @generated * @ordered */ @GwtTransient protected boolean sla = SLA_EDEFAULT; /** * This is true if the Sla attribute has been set. * * * @generated * @ordered */ @GwtTransient protected boolean slaESet; /** * * * @generated */ protected ParameterImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return BpsimPackage.Literals.PARAMETER; } /** * * * @generated */ @Override public EList getResultRequest() { if (resultRequest == null) { resultRequest = new EDataTypeEList(ResultType.class, this, BpsimPackage.PARAMETER__RESULT_REQUEST); } return resultRequest; } /** * * * @generated */ @Override public FeatureMap getParameterValueGroup() { if (parameterValueGroup == null) { parameterValueGroup = new BasicFeatureMap(this, BpsimPackage.PARAMETER__PARAMETER_VALUE_GROUP); } return parameterValueGroup; } /** * * * @generated */ @Override public EList getParameterValue() { return getParameterValueGroup().list(BpsimPackage.Literals.PARAMETER__PARAMETER_VALUE); } /** * * * @generated */ @Override public boolean isKpi() { return kpi; } /** * * * @generated */ @Override public void setKpi(boolean newKpi) { boolean oldKpi = kpi; kpi = newKpi; boolean oldKpiESet = kpiESet; kpiESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.PARAMETER__KPI, oldKpi, kpi, !oldKpiESet)); } /** * * * @generated */ @Override public void unsetKpi() { boolean oldKpi = kpi; boolean oldKpiESet = kpiESet; kpi = KPI_EDEFAULT; kpiESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, BpsimPackage.PARAMETER__KPI, oldKpi, KPI_EDEFAULT, oldKpiESet)); } /** * * * @generated */ @Override public boolean isSetKpi() { return kpiESet; } /** * * * @generated */ @Override public boolean isSla() { return sla; } /** * * * @generated */ @Override public void setSla(boolean newSla) { boolean oldSla = sla; sla = newSla; boolean oldSlaESet = slaESet; slaESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.PARAMETER__SLA, oldSla, sla, !oldSlaESet)); } /** * * * @generated */ @Override public void unsetSla() { boolean oldSla = sla; boolean oldSlaESet = slaESet; sla = SLA_EDEFAULT; slaESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, BpsimPackage.PARAMETER__SLA, oldSla, SLA_EDEFAULT, oldSlaESet)); } /** * * * @generated */ @Override public boolean isSetSla() { return slaESet; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case BpsimPackage.PARAMETER__PARAMETER_VALUE_GROUP: return ((InternalEList)getParameterValueGroup()).basicRemove(otherEnd, msgs); case BpsimPackage.PARAMETER__PARAMETER_VALUE: return ((InternalEList)getParameterValue()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case BpsimPackage.PARAMETER__RESULT_REQUEST: return getResultRequest(); case BpsimPackage.PARAMETER__PARAMETER_VALUE_GROUP: if (coreType) return getParameterValueGroup(); return ((FeatureMap.Internal)getParameterValueGroup()).getWrapper(); case BpsimPackage.PARAMETER__PARAMETER_VALUE: return getParameterValue(); case BpsimPackage.PARAMETER__KPI: return isKpi(); case BpsimPackage.PARAMETER__SLA: return isSla(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case BpsimPackage.PARAMETER__RESULT_REQUEST: getResultRequest().clear(); getResultRequest().addAll((Collection)newValue); return; case BpsimPackage.PARAMETER__PARAMETER_VALUE_GROUP: ((FeatureMap.Internal)getParameterValueGroup()).set(newValue); return; case BpsimPackage.PARAMETER__PARAMETER_VALUE: getParameterValue().clear(); getParameterValue().addAll((Collection)newValue); return; case BpsimPackage.PARAMETER__KPI: setKpi((Boolean)newValue); return; case BpsimPackage.PARAMETER__SLA: setSla((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case BpsimPackage.PARAMETER__RESULT_REQUEST: getResultRequest().clear(); return; case BpsimPackage.PARAMETER__PARAMETER_VALUE_GROUP: getParameterValueGroup().clear(); return; case BpsimPackage.PARAMETER__PARAMETER_VALUE: getParameterValue().clear(); return; case BpsimPackage.PARAMETER__KPI: unsetKpi(); return; case BpsimPackage.PARAMETER__SLA: unsetSla(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case BpsimPackage.PARAMETER__RESULT_REQUEST: return resultRequest != null && !resultRequest.isEmpty(); case BpsimPackage.PARAMETER__PARAMETER_VALUE_GROUP: return parameterValueGroup != null && !parameterValueGroup.isEmpty(); case BpsimPackage.PARAMETER__PARAMETER_VALUE: return !getParameterValue().isEmpty(); case BpsimPackage.PARAMETER__KPI: return isSetKpi(); case BpsimPackage.PARAMETER__SLA: return isSetSla(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (resultRequest: "); result.append(resultRequest); result.append(", parameterValueGroup: "); result.append(parameterValueGroup); result.append(", kpi: "); if (kpiESet) result.append(kpi); else result.append(""); result.append(", sla: "); if (slaESet) result.append(sla); else result.append(""); result.append(')'); return result.toString(); } } //ParameterImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy