/** * <copyright> * </copyright> * * $Id$ */ package org.talend.designer.core.model.utils.emf.talendfile.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.talend.designer.core.model.utils.emf.talendfile.JobType; import org.talend.designer.core.model.utils.emf.talendfile.TalendFilePackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Job Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.talend.designer.core.model.utils.emf.talendfile.impl.JobTypeImpl#getContext <em>Context</em>}</li> * <li>{@link org.talend.designer.core.model.utils.emf.talendfile.impl.JobTypeImpl#getName <em>Name</em>}</li> * </ul> * </p> * * @generated */ public class JobTypeImpl extends EObjectImpl implements JobType { /** * The default value of the '{@link #getContext() <em>Context</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getContext() * @generated * @ordered */ protected static final String CONTEXT_EDEFAULT = null; /** * The cached value of the '{@link #getContext() <em>Context</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getContext() * @generated * @ordered */ protected String context = CONTEXT_EDEFAULT; /** * 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; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected JobTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EClass eStaticClass() { return TalendFilePackage.Literals.JOB_TYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getContext() { return context; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setContext(String newContext) { String oldContext = context; context = newContext; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TalendFilePackage.JOB_TYPE__CONTEXT, oldContext, context)); } /** * <!-- 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, TalendFilePackage.JOB_TYPE__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TalendFilePackage.JOB_TYPE__CONTEXT: return getContext(); case TalendFilePackage.JOB_TYPE__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eSet(int featureID, Object newValue) { switch (featureID) { case TalendFilePackage.JOB_TYPE__CONTEXT: setContext((String)newValue); return; case TalendFilePackage.JOB_TYPE__NAME: setName((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void eUnset(int featureID) { switch (featureID) { case TalendFilePackage.JOB_TYPE__CONTEXT: setContext(CONTEXT_EDEFAULT); return; case TalendFilePackage.JOB_TYPE__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean eIsSet(int featureID) { switch (featureID) { case TalendFilePackage.JOB_TYPE__CONTEXT: return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context); case TalendFilePackage.JOB_TYPE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (context: "); result.append(context); result.append(", name: "); result.append(name); result.append(')'); return result.toString(); } } //JobTypeImpl