/******************************************************************************* | |
* Copyright (c) 2011 Mia-Software. | |
* 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: | |
* Nicolas Payneau (Mia-Software) - initial API and implementation | |
* Nicolas Bros (Mia-Software) - Bug 337402 - [Discovery Workflow] refactoring | |
*******************************************************************************/ | |
package org.eclipse.modisco.workflow.modiscoworkflow.impl; | |
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; | |
import org.eclipse.modisco.workflow.modiscoworkflow.ModiscoworkflowPackage; | |
import org.eclipse.modisco.workflow.modiscoworkflow.WorkParameterStringValue; | |
/** | |
* <!-- begin-user-doc --> An implementation of the model object ' | |
* <em><b>Work Parameter String Value</b></em>'. <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li> | |
* {@link org.eclipse.modisco.workflow.modiscoworkflow.impl.WorkParameterStringValueImpl#getValue | |
* <em>Value</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class WorkParameterStringValueImpl extends EObjectImpl implements WorkParameterStringValue { | |
/** | |
* The default value of the '{@link #getValue() <em>Value</em>}' attribute. | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @see #getValue() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String VALUE_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute. | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @see #getValue() | |
* @generated | |
* @ordered | |
*/ | |
protected String value = WorkParameterStringValueImpl.VALUE_EDEFAULT; | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
protected WorkParameterStringValueImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return ModiscoworkflowPackage.Literals.WORK_PARAMETER_STRING_VALUE; | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
public String getValue() { | |
return this.value; | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
public void setValue(final String newValue) { | |
String oldValue = this.value; | |
this.value = newValue; | |
if (eNotificationRequired()) { | |
eNotify(new ENotificationImpl(this, Notification.SET, | |
ModiscoworkflowPackage.WORK_PARAMETER_STRING_VALUE__VALUE, oldValue, this.value)); | |
} | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public Object eGet(final int featureID, final boolean resolve, final boolean coreType) { | |
switch (featureID) { | |
case ModiscoworkflowPackage.WORK_PARAMETER_STRING_VALUE__VALUE: | |
return getValue(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public void eSet(final int featureID, final Object newValue) { | |
switch (featureID) { | |
case ModiscoworkflowPackage.WORK_PARAMETER_STRING_VALUE__VALUE: | |
setValue((String) newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public void eUnset(final int featureID) { | |
switch (featureID) { | |
case ModiscoworkflowPackage.WORK_PARAMETER_STRING_VALUE__VALUE: | |
setValue(WorkParameterStringValueImpl.VALUE_EDEFAULT); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(final int featureID) { | |
switch (featureID) { | |
case ModiscoworkflowPackage.WORK_PARAMETER_STRING_VALUE__VALUE: | |
return WorkParameterStringValueImpl.VALUE_EDEFAULT == null ? this.value != null | |
: !WorkParameterStringValueImpl.VALUE_EDEFAULT.equals(this.value); | |
} | |
return super.eIsSet(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> <!-- end-user-doc --> | |
* | |
* @generated | |
*/ | |
@Override | |
public String toString() { | |
if (eIsProxy()) { | |
return super.toString(); | |
} | |
StringBuffer result = new StringBuffer(super.toString()); | |
result.append(" (value: "); //$NON-NLS-1$ | |
result.append(this.value); | |
result.append(')'); | |
return result.toString(); | |
} | |
} // WorkParameterStringValueImpl |