All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openxma.dsl.dom.model.impl.DeleteStatementImpl Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
/**
 * 
 * 
 *
 * $Id$
 */
package org.openxma.dsl.dom.model.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.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.DeleteStatement;
import org.openxma.dsl.dom.model.Entity;
import org.openxma.dsl.dom.model.Expression;

/**
 * 
 * An implementation of the model object 'Delete Statement'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.dom.model.impl.DeleteStatementImpl#getEntity Entity}
  • *
  • {@link org.openxma.dsl.dom.model.impl.DeleteStatementImpl#getName Name}
  • *
  • {@link org.openxma.dsl.dom.model.impl.DeleteStatementImpl#getWhere Where}
  • *
*

* * @generated */ public class DeleteStatementImpl extends QlStatementImpl implements DeleteStatement { /** * The cached value of the '{@link #getEntity() Entity}' reference. * * * @see #getEntity() * @generated * @ordered */ protected Entity entity; /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * The cached value of the '{@link #getWhere() Where}' containment reference. * * * @see #getWhere() * @generated * @ordered */ protected Expression where; /** * * * @generated */ protected DeleteStatementImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DomPackage.Literals.DELETE_STATEMENT; } /** * * * @generated */ public Entity getEntity() { if (entity != null && entity.eIsProxy()) { InternalEObject oldEntity = (InternalEObject)entity; entity = (Entity)eResolveProxy(oldEntity); if (entity != oldEntity) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomPackage.DELETE_STATEMENT__ENTITY, oldEntity, entity)); } } return entity; } /** * * * @generated */ public Entity basicGetEntity() { return entity; } /** * * * @generated */ public void setEntity(Entity newEntity) { Entity oldEntity = entity; entity = newEntity; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.DELETE_STATEMENT__ENTITY, oldEntity, entity)); } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.DELETE_STATEMENT__NAME, oldName, name)); } /** * * * @generated */ public Expression getWhere() { return where; } /** * * * @generated */ public NotificationChain basicSetWhere(Expression newWhere, NotificationChain msgs) { Expression oldWhere = where; where = newWhere; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.DELETE_STATEMENT__WHERE, oldWhere, newWhere); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setWhere(Expression newWhere) { if (newWhere != where) { NotificationChain msgs = null; if (where != null) msgs = ((InternalEObject)where).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.DELETE_STATEMENT__WHERE, null, msgs); if (newWhere != null) msgs = ((InternalEObject)newWhere).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.DELETE_STATEMENT__WHERE, null, msgs); msgs = basicSetWhere(newWhere, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.DELETE_STATEMENT__WHERE, newWhere, newWhere)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DomPackage.DELETE_STATEMENT__WHERE: return basicSetWhere(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DomPackage.DELETE_STATEMENT__ENTITY: if (resolve) return getEntity(); return basicGetEntity(); case DomPackage.DELETE_STATEMENT__NAME: return getName(); case DomPackage.DELETE_STATEMENT__WHERE: return getWhere(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DomPackage.DELETE_STATEMENT__ENTITY: setEntity((Entity)newValue); return; case DomPackage.DELETE_STATEMENT__NAME: setName((String)newValue); return; case DomPackage.DELETE_STATEMENT__WHERE: setWhere((Expression)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DomPackage.DELETE_STATEMENT__ENTITY: setEntity((Entity)null); return; case DomPackage.DELETE_STATEMENT__NAME: setName(NAME_EDEFAULT); return; case DomPackage.DELETE_STATEMENT__WHERE: setWhere((Expression)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DomPackage.DELETE_STATEMENT__ENTITY: return entity != null; case DomPackage.DELETE_STATEMENT__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case DomPackage.DELETE_STATEMENT__WHERE: return where != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //DeleteStatementImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy