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

de.opitzconsulting.orcasDsl.impl.DomainImpl Maven / Gradle / Ivy

Go to download

orcas model modified by syntax extensions (contains the original model). If custom-syntax-extensions are provided, there will be a custom artifact.

The newest version!
/**
 */
package de.opitzconsulting.orcasDsl.impl;

import de.opitzconsulting.orcasDsl.Domain;
import de.opitzconsulting.orcasDsl.DomainColumn;
import de.opitzconsulting.orcasDsl.HistoryTable;
import de.opitzconsulting.orcasDsl.OrcasDslPackage;

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.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

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

* The following features are implemented: *

*
    *
  • {@link de.opitzconsulting.orcasDsl.impl.DomainImpl#getName Name}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.DomainImpl#getExtends Extends}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.DomainImpl#getColumns Columns}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.DomainImpl#getHistoryTable History Table}
  • *
* * @generated */ public class DomainImpl extends ModelElementImpl implements Domain { /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ public static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ public String name = NAME_EDEFAULT; /** * The default value of the '{@link #getExtends() Extends}' attribute. * * * @see #getExtends() * @generated * @ordered */ public static final String EXTENDS_EDEFAULT = null; /** * The cached value of the '{@link #getExtends() Extends}' attribute. * * * @see #getExtends() * @generated * @ordered */ public String extends_ = EXTENDS_EDEFAULT; /** * The cached value of the '{@link #getColumns() Columns}' containment reference list. * * * @see #getColumns() * @generated * @ordered */ public EList columns; /** * The cached value of the '{@link #getHistoryTable() History Table}' containment reference. * * * @see #getHistoryTable() * @generated * @ordered */ public HistoryTable historyTable; /** * * * @generated */ public DomainImpl() { super(); } /** * * * @generated */ @Override public EClass eStaticClass() { return OrcasDslPackage.Literals.DOMAIN; } /** * * * @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, OrcasDslPackage.DOMAIN__NAME, oldName, name)); } /** * * * @generated */ public String getExtends() { return extends_; } /** * * * @generated */ public void setExtends(String newExtends) { String oldExtends = extends_; extends_ = newExtends; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.DOMAIN__EXTENDS, oldExtends, extends_)); } /** * * * @generated */ public EList getColumns() { if (columns == null) { columns = new EObjectContainmentEList(DomainColumn.class, this, OrcasDslPackage.DOMAIN__COLUMNS); } return columns; } /** * * * @generated */ public HistoryTable getHistoryTable() { return historyTable; } /** * * * @generated */ public NotificationChain basicSetHistoryTable(HistoryTable newHistoryTable, NotificationChain msgs) { HistoryTable oldHistoryTable = historyTable; historyTable = newHistoryTable; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrcasDslPackage.DOMAIN__HISTORY_TABLE, oldHistoryTable, newHistoryTable); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setHistoryTable(HistoryTable newHistoryTable) { if (newHistoryTable != historyTable) { NotificationChain msgs = null; if (historyTable != null) msgs = ((InternalEObject)historyTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrcasDslPackage.DOMAIN__HISTORY_TABLE, null, msgs); if (newHistoryTable != null) msgs = ((InternalEObject)newHistoryTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrcasDslPackage.DOMAIN__HISTORY_TABLE, null, msgs); msgs = basicSetHistoryTable(newHistoryTable, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.DOMAIN__HISTORY_TABLE, newHistoryTable, newHistoryTable)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case OrcasDslPackage.DOMAIN__COLUMNS: return ((InternalEList)getColumns()).basicRemove(otherEnd, msgs); case OrcasDslPackage.DOMAIN__HISTORY_TABLE: return basicSetHistoryTable(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case OrcasDslPackage.DOMAIN__NAME: return getName(); case OrcasDslPackage.DOMAIN__EXTENDS: return getExtends(); case OrcasDslPackage.DOMAIN__COLUMNS: return getColumns(); case OrcasDslPackage.DOMAIN__HISTORY_TABLE: return getHistoryTable(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case OrcasDslPackage.DOMAIN__NAME: setName((String)newValue); return; case OrcasDslPackage.DOMAIN__EXTENDS: setExtends((String)newValue); return; case OrcasDslPackage.DOMAIN__COLUMNS: getColumns().clear(); getColumns().addAll((Collection)newValue); return; case OrcasDslPackage.DOMAIN__HISTORY_TABLE: setHistoryTable((HistoryTable)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case OrcasDslPackage.DOMAIN__NAME: setName(NAME_EDEFAULT); return; case OrcasDslPackage.DOMAIN__EXTENDS: setExtends(EXTENDS_EDEFAULT); return; case OrcasDslPackage.DOMAIN__COLUMNS: getColumns().clear(); return; case OrcasDslPackage.DOMAIN__HISTORY_TABLE: setHistoryTable((HistoryTable)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case OrcasDslPackage.DOMAIN__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case OrcasDslPackage.DOMAIN__EXTENDS: return EXTENDS_EDEFAULT == null ? extends_ != null : !EXTENDS_EDEFAULT.equals(extends_); case OrcasDslPackage.DOMAIN__COLUMNS: return columns != null && !columns.isEmpty(); case OrcasDslPackage.DOMAIN__HISTORY_TABLE: return historyTable != 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(", extends: "); result.append(extends_); result.append(')'); return result.toString(); } } //DomainImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy