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

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

/**
 * 
 * 
 *
 */
package org.openxma.dsl.ddl.ddlDsl.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;

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.EObjectResolvingEList;

import org.openxma.dsl.ddl.ddlDsl.Column;
import org.openxma.dsl.ddl.ddlDsl.CreateTable;
import org.openxma.dsl.ddl.ddlDsl.DdlDslPackage;
import org.openxma.dsl.ddl.ddlDsl.ReferenceClause;

/**
 * 
 * An implementation of the model object 'Reference Clause'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.ReferenceClauseImpl#getTable Table}
  • *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.ReferenceClauseImpl#getColumns Columns}
  • *
*

* * @generated */ public class ReferenceClauseImpl extends MinimalEObjectImpl.Container implements ReferenceClause { /** * The cached value of the '{@link #getTable() Table}' reference. * * * @see #getTable() * @generated * @ordered */ protected CreateTable table; /** * The cached value of the '{@link #getColumns() Columns}' reference list. * * * @see #getColumns() * @generated * @ordered */ protected EList columns; /** * * * @generated */ protected ReferenceClauseImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DdlDslPackage.Literals.REFERENCE_CLAUSE; } /** * * * @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.REFERENCE_CLAUSE__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.REFERENCE_CLAUSE__TABLE, oldTable, table)); } /** * * * @generated */ public EList getColumns() { if (columns == null) { columns = new EObjectResolvingEList(Column.class, this, DdlDslPackage.REFERENCE_CLAUSE__COLUMNS); } return columns; } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DdlDslPackage.REFERENCE_CLAUSE__TABLE: if (resolve) return getTable(); return basicGetTable(); case DdlDslPackage.REFERENCE_CLAUSE__COLUMNS: return getColumns(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DdlDslPackage.REFERENCE_CLAUSE__TABLE: setTable((CreateTable)newValue); return; case DdlDslPackage.REFERENCE_CLAUSE__COLUMNS: getColumns().clear(); getColumns().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DdlDslPackage.REFERENCE_CLAUSE__TABLE: setTable((CreateTable)null); return; case DdlDslPackage.REFERENCE_CLAUSE__COLUMNS: getColumns().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DdlDslPackage.REFERENCE_CLAUSE__TABLE: return table != null; case DdlDslPackage.REFERENCE_CLAUSE__COLUMNS: return columns != null && !columns.isEmpty(); } return super.eIsSet(featureID); } } //ReferenceClauseImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy