/******************************************************************************* * Copyright (c) 2008, 2012 Obeo. * 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: * Obeo - initial API and implementation *******************************************************************************/ package org.eclipse.emf.eef.extended.editor.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; 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.eclipse.emf.eef.extended.editor.EEFPageInput; import org.eclipse.emf.eef.extended.editor.EditorPackage; import org.eclipse.emf.eef.extended.query.EEFUnderstandableQuery; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>EEF Page Input</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.emf.eef.extended.editor.impl.EEFPageInputImpl#getQuery <em>Query</em>}</li> * </ul> * </p> * * @generated */ public abstract class EEFPageInputImpl extends EObjectImpl implements EEFPageInput { /** * The cached value of the '{@link #getQuery() <em>Query</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getQuery() * @generated * @ordered */ protected EEFUnderstandableQuery query; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EEFPageInputImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return EditorPackage.Literals.EEF_PAGE_INPUT; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EEFUnderstandableQuery getQuery() { return query; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetQuery(EEFUnderstandableQuery newQuery, NotificationChain msgs) { EEFUnderstandableQuery oldQuery = query; query = newQuery; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EditorPackage.EEF_PAGE_INPUT__QUERY, oldQuery, newQuery); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setQuery(EEFUnderstandableQuery newQuery) { if (newQuery != query) { NotificationChain msgs = null; if (query != null) msgs = ((InternalEObject)query).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EditorPackage.EEF_PAGE_INPUT__QUERY, null, msgs); if (newQuery != null) msgs = ((InternalEObject)newQuery).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EditorPackage.EEF_PAGE_INPUT__QUERY, null, msgs); msgs = basicSetQuery(newQuery, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EditorPackage.EEF_PAGE_INPUT__QUERY, newQuery, newQuery)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case EditorPackage.EEF_PAGE_INPUT__QUERY: return basicSetQuery(null, 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 EditorPackage.EEF_PAGE_INPUT__QUERY: return getQuery(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EditorPackage.EEF_PAGE_INPUT__QUERY: setQuery((EEFUnderstandableQuery)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EditorPackage.EEF_PAGE_INPUT__QUERY: setQuery((EEFUnderstandableQuery)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EditorPackage.EEF_PAGE_INPUT__QUERY: return query != null; } return super.eIsSet(featureID); } } //EEFPageInputImpl