/** * <copyright> * </copyright> * * $Id$ */ package org.talend.core.model.properties.impl; import org.eclipse.emf.common.notify.Notification; 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.talend.core.model.properties.ExecutionPlanPart; import org.talend.core.model.properties.ExecutionPlanPartCmdPrm; import org.talend.core.model.properties.PropertiesPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Execution Plan Part Cmd Prm</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.talend.core.model.properties.impl.ExecutionPlanPartCmdPrmImpl#getId <em>Id</em>}</li> * <li>{@link org.talend.core.model.properties.impl.ExecutionPlanPartCmdPrmImpl#getExecutionPlanPart <em>Execution Plan Part</em>}</li> * <li>{@link org.talend.core.model.properties.impl.ExecutionPlanPartCmdPrmImpl#getName <em>Name</em>}</li> * <li>{@link org.talend.core.model.properties.impl.ExecutionPlanPartCmdPrmImpl#getValue <em>Value</em>}</li> * </ul> * </p> * * @generated */ public class ExecutionPlanPartCmdPrmImpl extends EObjectImpl implements ExecutionPlanPartCmdPrm { /** * The default value of the '{@link #getId() <em>Id</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getId() * @generated * @ordered */ protected static final int ID_EDEFAULT = 0; /** * The cached value of the '{@link #getId() <em>Id</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getId() * @generated * @ordered */ protected int id = ID_EDEFAULT; /** * The cached value of the '{@link #getExecutionPlanPart() <em>Execution Plan Part</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getExecutionPlanPart() * @generated * @ordered */ protected ExecutionPlanPart executionPlanPart; /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * 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 = VALUE_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ExecutionPlanPartCmdPrmImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return PropertiesPackage.Literals.EXECUTION_PLAN_PART_CMD_PRM; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public int getId() { return id; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setId(int newId) { int oldId = id; id = newId; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__ID, oldId, id)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExecutionPlanPart getExecutionPlanPart() { if (executionPlanPart != null && executionPlanPart.eIsProxy()) { InternalEObject oldExecutionPlanPart = (InternalEObject)executionPlanPart; executionPlanPart = (ExecutionPlanPart)eResolveProxy(oldExecutionPlanPart); if (executionPlanPart != oldExecutionPlanPart) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__EXECUTION_PLAN_PART, oldExecutionPlanPart, executionPlanPart)); } } return executionPlanPart; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ExecutionPlanPart basicGetExecutionPlanPart() { return executionPlanPart; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setExecutionPlanPart(ExecutionPlanPart newExecutionPlanPart) { ExecutionPlanPart oldExecutionPlanPart = executionPlanPart; executionPlanPart = newExecutionPlanPart; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__EXECUTION_PLAN_PART, oldExecutionPlanPart, executionPlanPart)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setValue(String newValue) { String oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__VALUE, oldValue, value)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__ID: return new Integer(getId()); case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__EXECUTION_PLAN_PART: if (resolve) return getExecutionPlanPart(); return basicGetExecutionPlanPart(); case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__NAME: return getName(); case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__VALUE: return getValue(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__ID: setId(((Integer)newValue).intValue()); return; case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__EXECUTION_PLAN_PART: setExecutionPlanPart((ExecutionPlanPart)newValue); return; case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__NAME: setName((String)newValue); return; case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__VALUE: setValue((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__ID: setId(ID_EDEFAULT); return; case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__EXECUTION_PLAN_PART: setExecutionPlanPart((ExecutionPlanPart)null); return; case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__NAME: setName(NAME_EDEFAULT); return; case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__VALUE: setValue(VALUE_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__ID: return id != ID_EDEFAULT; case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__EXECUTION_PLAN_PART: return executionPlanPart != null; case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case PropertiesPackage.EXECUTION_PLAN_PART_CMD_PRM__VALUE: return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(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(" (id: "); result.append(id); result.append(", name: "); result.append(name); result.append(", value: "); result.append(value); result.append(')'); return result.toString(); } } //ExecutionPlanPartCmdPrmImpl