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

org.openxma.dsl.ddl.ddlDsl.impl.AlterImpl Maven / Gradle / Ivy

/**
 * 
 * 
 *
 */
package org.openxma.dsl.ddl.ddlDsl.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.ddl.ddlDsl.Alter;
import org.openxma.dsl.ddl.ddlDsl.AlterTableAction;
import org.openxma.dsl.ddl.ddlDsl.CreateTable;
import org.openxma.dsl.ddl.ddlDsl.DdlDslPackage;

/**
 * 
 * An implementation of the model object 'Alter'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.AlterImpl#getTable Table}
  • *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.AlterImpl#getAction Action}
  • *
*

* * @generated */ public class AlterImpl extends DdlStatementImpl implements Alter { /** * The cached value of the '{@link #getTable() Table}' reference. * * * @see #getTable() * @generated * @ordered */ protected CreateTable table; /** * The cached value of the '{@link #getAction() Action}' containment reference. * * * @see #getAction() * @generated * @ordered */ protected AlterTableAction action; /** * * * @generated */ protected AlterImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DdlDslPackage.Literals.ALTER; } /** * * * @generated */ public CreateTable getTable() { if (table != null && table.eIsProxy()) { InternalEObject oldTable = (InternalEObject)table; table = (CreateTable)eResolveProxy(oldTable); if (table != oldTable) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, DdlDslPackage.ALTER__TABLE, oldTable, table)); } } return table; } /** * * * @generated */ public CreateTable basicGetTable() { return table; } /** * * * @generated */ public void setTable(CreateTable newTable) { CreateTable oldTable = table; table = newTable; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.ALTER__TABLE, oldTable, table)); } /** * * * @generated */ public AlterTableAction getAction() { return action; } /** * * * @generated */ public NotificationChain basicSetAction(AlterTableAction newAction, NotificationChain msgs) { AlterTableAction oldAction = action; action = newAction; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DdlDslPackage.ALTER__ACTION, oldAction, newAction); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setAction(AlterTableAction newAction) { if (newAction != action) { NotificationChain msgs = null; if (action != null) msgs = ((InternalEObject)action).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DdlDslPackage.ALTER__ACTION, null, msgs); if (newAction != null) msgs = ((InternalEObject)newAction).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DdlDslPackage.ALTER__ACTION, null, msgs); msgs = basicSetAction(newAction, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.ALTER__ACTION, newAction, newAction)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DdlDslPackage.ALTER__ACTION: return basicSetAction(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DdlDslPackage.ALTER__TABLE: if (resolve) return getTable(); return basicGetTable(); case DdlDslPackage.ALTER__ACTION: return getAction(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DdlDslPackage.ALTER__TABLE: setTable((CreateTable)newValue); return; case DdlDslPackage.ALTER__ACTION: setAction((AlterTableAction)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DdlDslPackage.ALTER__TABLE: setTable((CreateTable)null); return; case DdlDslPackage.ALTER__ACTION: setAction((AlterTableAction)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DdlDslPackage.ALTER__TABLE: return table != null; case DdlDslPackage.ALTER__ACTION: return action != null; } return super.eIsSet(featureID); } } //AlterImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy