/** */ package at.bestsolution.persistence.emap.eMap.impl; import at.bestsolution.persistence.emap.eMap.ECustomServiceMethods; import at.bestsolution.persistence.emap.eMap.EMapPackage; import at.bestsolution.persistence.emap.eMap.EParameter; 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.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>ECustom Service Methods</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link at.bestsolution.persistence.emap.eMap.impl.ECustomServiceMethodsImpl#getName <em>Name</em>}</li> * <li>{@link at.bestsolution.persistence.emap.eMap.impl.ECustomServiceMethodsImpl#getPath <em>Path</em>}</li> * <li>{@link at.bestsolution.persistence.emap.eMap.impl.ECustomServiceMethodsImpl#getParameters <em>Parameters</em>}</li> * </ul> * * @generated */ public class ECustomServiceMethodsImpl extends MinimalEObjectImpl.Container implements ECustomServiceMethods { /** * 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 #getPath() <em>Path</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPath() * @generated * @ordered */ protected static final String PATH_EDEFAULT = null; /** * The cached value of the '{@link #getPath() <em>Path</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPath() * @generated * @ordered */ protected String path = PATH_EDEFAULT; /** * The cached value of the '{@link #getParameters() <em>Parameters</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getParameters() * @generated * @ordered */ protected EList<EParameter> parameters; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ECustomServiceMethodsImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return EMapPackage.Literals.ECUSTOM_SERVICE_METHODS; } /** * <!-- 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, EMapPackage.ECUSTOM_SERVICE_METHODS__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getPath() { return path; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setPath(String newPath) { String oldPath = path; path = newPath; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EMapPackage.ECUSTOM_SERVICE_METHODS__PATH, oldPath, path)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<EParameter> getParameters() { if (parameters == null) { parameters = new EObjectContainmentEList<EParameter>(EParameter.class, this, EMapPackage.ECUSTOM_SERVICE_METHODS__PARAMETERS); } return parameters; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case EMapPackage.ECUSTOM_SERVICE_METHODS__PARAMETERS: return ((InternalEList<?>)getParameters()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EMapPackage.ECUSTOM_SERVICE_METHODS__NAME: return getName(); case EMapPackage.ECUSTOM_SERVICE_METHODS__PATH: return getPath(); case EMapPackage.ECUSTOM_SERVICE_METHODS__PARAMETERS: return getParameters(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EMapPackage.ECUSTOM_SERVICE_METHODS__NAME: setName((String)newValue); return; case EMapPackage.ECUSTOM_SERVICE_METHODS__PATH: setPath((String)newValue); return; case EMapPackage.ECUSTOM_SERVICE_METHODS__PARAMETERS: getParameters().clear(); getParameters().addAll((Collection<? extends EParameter>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EMapPackage.ECUSTOM_SERVICE_METHODS__NAME: setName(NAME_EDEFAULT); return; case EMapPackage.ECUSTOM_SERVICE_METHODS__PATH: setPath(PATH_EDEFAULT); return; case EMapPackage.ECUSTOM_SERVICE_METHODS__PARAMETERS: getParameters().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EMapPackage.ECUSTOM_SERVICE_METHODS__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case EMapPackage.ECUSTOM_SERVICE_METHODS__PATH: return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); case EMapPackage.ECUSTOM_SERVICE_METHODS__PARAMETERS: return parameters != null && !parameters.isEmpty(); } 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(" (name: "); result.append(name); result.append(", path: "); result.append(path); result.append(')'); return result.toString(); } } //ECustomServiceMethodsImpl