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

org.openxma.dsl.ddl.ddlDsl.impl.ColumnImpl 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.Column;
import org.openxma.dsl.ddl.ddlDsl.Constraint;
import org.openxma.dsl.ddl.ddlDsl.DdlDslPackage;
import org.openxma.dsl.ddl.ddlDsl.ReferenceClause;
import org.openxma.dsl.ddl.ddlDsl.SqlDataType;

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

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.ColumnImpl#getType Type}
  • *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.ColumnImpl#isSorted Sorted}
  • *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.ColumnImpl#getConstraint Constraint}
  • *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.ColumnImpl#getDefault Default}
  • *
  • {@link org.openxma.dsl.ddl.ddlDsl.impl.ColumnImpl#getReference Reference}
  • *
*

* * @generated */ public class ColumnImpl extends TablePropertyImpl implements Column { /** * The cached value of the '{@link #getType() Type}' containment reference. * * * @see #getType() * @generated * @ordered */ protected SqlDataType type; /** * The default value of the '{@link #isSorted() Sorted}' attribute. * * * @see #isSorted() * @generated * @ordered */ protected static final boolean SORTED_EDEFAULT = false; /** * The cached value of the '{@link #isSorted() Sorted}' attribute. * * * @see #isSorted() * @generated * @ordered */ protected boolean sorted = SORTED_EDEFAULT; /** * The cached value of the '{@link #getConstraint() Constraint}' containment reference. * * * @see #getConstraint() * @generated * @ordered */ protected Constraint constraint; /** * The default value of the '{@link #getDefault() Default}' attribute. * * * @see #getDefault() * @generated * @ordered */ protected static final String DEFAULT_EDEFAULT = null; /** * The cached value of the '{@link #getDefault() Default}' attribute. * * * @see #getDefault() * @generated * @ordered */ protected String default_ = DEFAULT_EDEFAULT; /** * The cached value of the '{@link #getReference() Reference}' containment reference. * * * @see #getReference() * @generated * @ordered */ protected ReferenceClause reference; /** * * * @generated */ protected ColumnImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DdlDslPackage.Literals.COLUMN; } /** * * * @generated */ public SqlDataType getType() { return type; } /** * * * @generated */ public NotificationChain basicSetType(SqlDataType newType, NotificationChain msgs) { SqlDataType oldType = type; type = newType; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DdlDslPackage.COLUMN__TYPE, oldType, newType); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setType(SqlDataType newType) { if (newType != type) { NotificationChain msgs = null; if (type != null) msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DdlDslPackage.COLUMN__TYPE, null, msgs); if (newType != null) msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DdlDslPackage.COLUMN__TYPE, null, msgs); msgs = basicSetType(newType, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.COLUMN__TYPE, newType, newType)); } /** * * * @generated */ public boolean isSorted() { return sorted; } /** * * * @generated */ public void setSorted(boolean newSorted) { boolean oldSorted = sorted; sorted = newSorted; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.COLUMN__SORTED, oldSorted, sorted)); } /** * * * @generated */ public Constraint getConstraint() { return constraint; } /** * * * @generated */ public NotificationChain basicSetConstraint(Constraint newConstraint, NotificationChain msgs) { Constraint oldConstraint = constraint; constraint = newConstraint; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DdlDslPackage.COLUMN__CONSTRAINT, oldConstraint, newConstraint); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setConstraint(Constraint newConstraint) { if (newConstraint != constraint) { NotificationChain msgs = null; if (constraint != null) msgs = ((InternalEObject)constraint).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DdlDslPackage.COLUMN__CONSTRAINT, null, msgs); if (newConstraint != null) msgs = ((InternalEObject)newConstraint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DdlDslPackage.COLUMN__CONSTRAINT, null, msgs); msgs = basicSetConstraint(newConstraint, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.COLUMN__CONSTRAINT, newConstraint, newConstraint)); } /** * * * @generated */ public String getDefault() { return default_; } /** * * * @generated */ public void setDefault(String newDefault) { String oldDefault = default_; default_ = newDefault; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.COLUMN__DEFAULT, oldDefault, default_)); } /** * * * @generated */ public ReferenceClause getReference() { return reference; } /** * * * @generated */ public NotificationChain basicSetReference(ReferenceClause newReference, NotificationChain msgs) { ReferenceClause oldReference = reference; reference = newReference; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DdlDslPackage.COLUMN__REFERENCE, oldReference, newReference); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setReference(ReferenceClause newReference) { if (newReference != reference) { NotificationChain msgs = null; if (reference != null) msgs = ((InternalEObject)reference).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DdlDslPackage.COLUMN__REFERENCE, null, msgs); if (newReference != null) msgs = ((InternalEObject)newReference).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DdlDslPackage.COLUMN__REFERENCE, null, msgs); msgs = basicSetReference(newReference, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.COLUMN__REFERENCE, newReference, newReference)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DdlDslPackage.COLUMN__TYPE: return basicSetType(null, msgs); case DdlDslPackage.COLUMN__CONSTRAINT: return basicSetConstraint(null, msgs); case DdlDslPackage.COLUMN__REFERENCE: return basicSetReference(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DdlDslPackage.COLUMN__TYPE: return getType(); case DdlDslPackage.COLUMN__SORTED: return isSorted(); case DdlDslPackage.COLUMN__CONSTRAINT: return getConstraint(); case DdlDslPackage.COLUMN__DEFAULT: return getDefault(); case DdlDslPackage.COLUMN__REFERENCE: return getReference(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DdlDslPackage.COLUMN__TYPE: setType((SqlDataType)newValue); return; case DdlDslPackage.COLUMN__SORTED: setSorted((Boolean)newValue); return; case DdlDslPackage.COLUMN__CONSTRAINT: setConstraint((Constraint)newValue); return; case DdlDslPackage.COLUMN__DEFAULT: setDefault((String)newValue); return; case DdlDslPackage.COLUMN__REFERENCE: setReference((ReferenceClause)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DdlDslPackage.COLUMN__TYPE: setType((SqlDataType)null); return; case DdlDslPackage.COLUMN__SORTED: setSorted(SORTED_EDEFAULT); return; case DdlDslPackage.COLUMN__CONSTRAINT: setConstraint((Constraint)null); return; case DdlDslPackage.COLUMN__DEFAULT: setDefault(DEFAULT_EDEFAULT); return; case DdlDslPackage.COLUMN__REFERENCE: setReference((ReferenceClause)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DdlDslPackage.COLUMN__TYPE: return type != null; case DdlDslPackage.COLUMN__SORTED: return sorted != SORTED_EDEFAULT; case DdlDslPackage.COLUMN__CONSTRAINT: return constraint != null; case DdlDslPackage.COLUMN__DEFAULT: return DEFAULT_EDEFAULT == null ? default_ != null : !DEFAULT_EDEFAULT.equals(default_); case DdlDslPackage.COLUMN__REFERENCE: return reference != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (sorted: "); result.append(sorted); result.append(", default: "); result.append(default_); result.append(')'); return result.toString(); } } //ColumnImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy