bpsim.impl.ParameterValueImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbpm-bpmn2-emfextmodel Show documentation
Show all versions of jbpm-bpmn2-emfextmodel Show documentation
jBPM BPMN2 EMF Extension Model
/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*/
package bpsim.impl;
import bpsim.BpsimPackage;
import bpsim.ParameterValue;
import bpsim.ResultType;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
/**
*
* An implementation of the model object 'Parameter Value'.
*
*
* The following features are implemented:
*
* - {@link bpsim.impl.ParameterValueImpl#getInstance Instance}
* - {@link bpsim.impl.ParameterValueImpl#getResult Result}
* - {@link bpsim.impl.ParameterValueImpl#getValidFor Valid For}
*
*
*
* @generated
*/
public class ParameterValueImpl extends EObjectImpl implements ParameterValue {
/**
* The default value of the '{@link #getInstance() Instance}' attribute.
*
*
* @see #getInstance()
* @generated
* @ordered
*/
protected static final String INSTANCE_EDEFAULT = null;
/**
* The cached value of the '{@link #getInstance() Instance}' attribute.
*
*
* @see #getInstance()
* @generated
* @ordered
*/
protected String instance = INSTANCE_EDEFAULT;
/**
* The default value of the '{@link #getResult() Result}' attribute.
*
*
* @see #getResult()
* @generated
* @ordered
*/
protected static final ResultType RESULT_EDEFAULT = ResultType.MIN;
/**
* The cached value of the '{@link #getResult() Result}' attribute.
*
*
* @see #getResult()
* @generated
* @ordered
*/
protected ResultType result = RESULT_EDEFAULT;
/**
* This is true if the Result attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean resultESet;
/**
* The default value of the '{@link #getValidFor() Valid For}' attribute.
*
*
* @see #getValidFor()
* @generated
* @ordered
*/
protected static final String VALID_FOR_EDEFAULT = null;
/**
* The cached value of the '{@link #getValidFor() Valid For}' attribute.
*
*
* @see #getValidFor()
* @generated
* @ordered
*/
protected String validFor = VALID_FOR_EDEFAULT;
/**
*
*
* @generated
*/
protected ParameterValueImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpsimPackage.Literals.PARAMETER_VALUE;
}
/**
*
*
* @generated
*/
public String getInstance() {
return instance;
}
/**
*
*
* @generated
*/
public void setInstance(String newInstance) {
String oldInstance = instance;
instance = newInstance;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.PARAMETER_VALUE__INSTANCE, oldInstance, instance));
}
/**
*
*
* @generated
*/
public ResultType getResult() {
return result;
}
/**
*
*
* @generated
*/
public void setResult(ResultType newResult) {
ResultType oldResult = result;
result = newResult == null ? RESULT_EDEFAULT : newResult;
boolean oldResultESet = resultESet;
resultESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.PARAMETER_VALUE__RESULT, oldResult, result, !oldResultESet));
}
/**
*
*
* @generated
*/
public void unsetResult() {
ResultType oldResult = result;
boolean oldResultESet = resultESet;
result = RESULT_EDEFAULT;
resultESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, BpsimPackage.PARAMETER_VALUE__RESULT, oldResult, RESULT_EDEFAULT, oldResultESet));
}
/**
*
*
* @generated
*/
public boolean isSetResult() {
return resultESet;
}
/**
*
*
* @generated
*/
public String getValidFor() {
return validFor;
}
/**
*
*
* @generated
*/
public void setValidFor(String newValidFor) {
String oldValidFor = validFor;
validFor = newValidFor;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.PARAMETER_VALUE__VALID_FOR, oldValidFor, validFor));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpsimPackage.PARAMETER_VALUE__INSTANCE:
return getInstance();
case BpsimPackage.PARAMETER_VALUE__RESULT:
return getResult();
case BpsimPackage.PARAMETER_VALUE__VALID_FOR:
return getValidFor();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpsimPackage.PARAMETER_VALUE__INSTANCE:
setInstance((String)newValue);
return;
case BpsimPackage.PARAMETER_VALUE__RESULT:
setResult((ResultType)newValue);
return;
case BpsimPackage.PARAMETER_VALUE__VALID_FOR:
setValidFor((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpsimPackage.PARAMETER_VALUE__INSTANCE:
setInstance(INSTANCE_EDEFAULT);
return;
case BpsimPackage.PARAMETER_VALUE__RESULT:
unsetResult();
return;
case BpsimPackage.PARAMETER_VALUE__VALID_FOR:
setValidFor(VALID_FOR_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpsimPackage.PARAMETER_VALUE__INSTANCE:
return INSTANCE_EDEFAULT == null ? instance != null : !INSTANCE_EDEFAULT.equals(instance);
case BpsimPackage.PARAMETER_VALUE__RESULT:
return isSetResult();
case BpsimPackage.PARAMETER_VALUE__VALID_FOR:
return VALID_FOR_EDEFAULT == null ? validFor != null : !VALID_FOR_EDEFAULT.equals(validFor);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (instance: ");
result.append(instance);
result.append(", result: ");
if (resultESet) result.append(result); else result.append("");
result.append(", validFor: ");
result.append(validFor);
result.append(')');
return result.toString();
}
} //ParameterValueImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy