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

de.opitzconsulting.orcasDsl.impl.ForeignKeyImpl 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.ColumnRef;
import de.opitzconsulting.orcasDsl.DeferrType;
import de.opitzconsulting.orcasDsl.EnableType;
import de.opitzconsulting.orcasDsl.FkDeleteRuleType;
import de.opitzconsulting.orcasDsl.ForeignKey;
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.impl.MinimalEObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * 
 * An implementation of the model object 'Foreign Key'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link de.opitzconsulting.orcasDsl.impl.ForeignKeyImpl#getConsName Cons Name}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.ForeignKeyImpl#getSrcColumns Src Columns}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.ForeignKeyImpl#getDestTable Dest Table}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.ForeignKeyImpl#getDestColumns Dest Columns}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.ForeignKeyImpl#getDelete_rule Delete rule}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.ForeignKeyImpl#getDeferrtype Deferrtype}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.ForeignKeyImpl#getStatus Status}
  • *
* * @generated */ public class ForeignKeyImpl extends MinimalEObjectImpl.Container implements ForeignKey { /** * The default value of the '{@link #getConsName() Cons Name}' attribute. * * * @see #getConsName() * @generated * @ordered */ public static final String CONS_NAME_EDEFAULT = null; /** * The cached value of the '{@link #getConsName() Cons Name}' attribute. * * * @see #getConsName() * @generated * @ordered */ public String consName = CONS_NAME_EDEFAULT; /** * The cached value of the '{@link #getSrcColumns() Src Columns}' containment reference list. * * * @see #getSrcColumns() * @generated * @ordered */ public EList srcColumns; /** * The default value of the '{@link #getDestTable() Dest Table}' attribute. * * * @see #getDestTable() * @generated * @ordered */ public static final String DEST_TABLE_EDEFAULT = null; /** * The cached value of the '{@link #getDestTable() Dest Table}' attribute. * * * @see #getDestTable() * @generated * @ordered */ public String destTable = DEST_TABLE_EDEFAULT; /** * The cached value of the '{@link #getDestColumns() Dest Columns}' containment reference list. * * * @see #getDestColumns() * @generated * @ordered */ public EList destColumns; /** * The default value of the '{@link #getDelete_rule() Delete rule}' attribute. * * * @see #getDelete_rule() * @generated * @ordered */ public static final FkDeleteRuleType DELETE_RULE_EDEFAULT = null; /** * The cached value of the '{@link #getDelete_rule() Delete rule}' attribute. * * * @see #getDelete_rule() * @generated * @ordered */ public FkDeleteRuleType delete_rule = DELETE_RULE_EDEFAULT; /** * The default value of the '{@link #getDeferrtype() Deferrtype}' attribute. * * * @see #getDeferrtype() * @generated * @ordered */ public static final DeferrType DEFERRTYPE_EDEFAULT = null; /** * The cached value of the '{@link #getDeferrtype() Deferrtype}' attribute. * * * @see #getDeferrtype() * @generated * @ordered */ public DeferrType deferrtype = DEFERRTYPE_EDEFAULT; /** * The default value of the '{@link #getStatus() Status}' attribute. * * * @see #getStatus() * @generated * @ordered */ public static final EnableType STATUS_EDEFAULT = null; /** * The cached value of the '{@link #getStatus() Status}' attribute. * * * @see #getStatus() * @generated * @ordered */ public EnableType status = STATUS_EDEFAULT; /** * * * @generated */ public ForeignKeyImpl() { super(); } /** * * * @generated */ @Override public EClass eStaticClass() { return OrcasDslPackage.Literals.FOREIGN_KEY; } /** * * * @generated */ public String getConsName() { return consName; } /** * * * @generated */ public void setConsName(String newConsName) { String oldConsName = consName; consName = newConsName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.FOREIGN_KEY__CONS_NAME, oldConsName, consName)); } /** * * * @generated */ public EList getSrcColumns() { if (srcColumns == null) { srcColumns = new EObjectContainmentEList(ColumnRef.class, this, OrcasDslPackage.FOREIGN_KEY__SRC_COLUMNS); } return srcColumns; } /** * * * @generated */ public String getDestTable() { return destTable; } /** * * * @generated */ public void setDestTable(String newDestTable) { String oldDestTable = destTable; destTable = newDestTable; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.FOREIGN_KEY__DEST_TABLE, oldDestTable, destTable)); } /** * * * @generated */ public EList getDestColumns() { if (destColumns == null) { destColumns = new EObjectContainmentEList(ColumnRef.class, this, OrcasDslPackage.FOREIGN_KEY__DEST_COLUMNS); } return destColumns; } /** * * * @generated */ public FkDeleteRuleType getDelete_rule() { return delete_rule; } /** * * * @generated */ public void setDelete_rule(FkDeleteRuleType newDelete_rule) { FkDeleteRuleType oldDelete_rule = delete_rule; delete_rule = newDelete_rule == null ? DELETE_RULE_EDEFAULT : newDelete_rule; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.FOREIGN_KEY__DELETE_RULE, oldDelete_rule, delete_rule)); } /** * * * @generated */ public DeferrType getDeferrtype() { return deferrtype; } /** * * * @generated */ public void setDeferrtype(DeferrType newDeferrtype) { DeferrType oldDeferrtype = deferrtype; deferrtype = newDeferrtype == null ? DEFERRTYPE_EDEFAULT : newDeferrtype; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.FOREIGN_KEY__DEFERRTYPE, oldDeferrtype, deferrtype)); } /** * * * @generated */ public EnableType getStatus() { return status; } /** * * * @generated */ public void setStatus(EnableType newStatus) { EnableType oldStatus = status; status = newStatus == null ? STATUS_EDEFAULT : newStatus; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.FOREIGN_KEY__STATUS, oldStatus, status)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case OrcasDslPackage.FOREIGN_KEY__SRC_COLUMNS: return ((InternalEList)getSrcColumns()).basicRemove(otherEnd, msgs); case OrcasDslPackage.FOREIGN_KEY__DEST_COLUMNS: return ((InternalEList)getDestColumns()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case OrcasDslPackage.FOREIGN_KEY__CONS_NAME: return getConsName(); case OrcasDslPackage.FOREIGN_KEY__SRC_COLUMNS: return getSrcColumns(); case OrcasDslPackage.FOREIGN_KEY__DEST_TABLE: return getDestTable(); case OrcasDslPackage.FOREIGN_KEY__DEST_COLUMNS: return getDestColumns(); case OrcasDslPackage.FOREIGN_KEY__DELETE_RULE: return getDelete_rule(); case OrcasDslPackage.FOREIGN_KEY__DEFERRTYPE: return getDeferrtype(); case OrcasDslPackage.FOREIGN_KEY__STATUS: return getStatus(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case OrcasDslPackage.FOREIGN_KEY__CONS_NAME: setConsName((String)newValue); return; case OrcasDslPackage.FOREIGN_KEY__SRC_COLUMNS: getSrcColumns().clear(); getSrcColumns().addAll((Collection)newValue); return; case OrcasDslPackage.FOREIGN_KEY__DEST_TABLE: setDestTable((String)newValue); return; case OrcasDslPackage.FOREIGN_KEY__DEST_COLUMNS: getDestColumns().clear(); getDestColumns().addAll((Collection)newValue); return; case OrcasDslPackage.FOREIGN_KEY__DELETE_RULE: setDelete_rule((FkDeleteRuleType)newValue); return; case OrcasDslPackage.FOREIGN_KEY__DEFERRTYPE: setDeferrtype((DeferrType)newValue); return; case OrcasDslPackage.FOREIGN_KEY__STATUS: setStatus((EnableType)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case OrcasDslPackage.FOREIGN_KEY__CONS_NAME: setConsName(CONS_NAME_EDEFAULT); return; case OrcasDslPackage.FOREIGN_KEY__SRC_COLUMNS: getSrcColumns().clear(); return; case OrcasDslPackage.FOREIGN_KEY__DEST_TABLE: setDestTable(DEST_TABLE_EDEFAULT); return; case OrcasDslPackage.FOREIGN_KEY__DEST_COLUMNS: getDestColumns().clear(); return; case OrcasDslPackage.FOREIGN_KEY__DELETE_RULE: setDelete_rule(DELETE_RULE_EDEFAULT); return; case OrcasDslPackage.FOREIGN_KEY__DEFERRTYPE: setDeferrtype(DEFERRTYPE_EDEFAULT); return; case OrcasDslPackage.FOREIGN_KEY__STATUS: setStatus(STATUS_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case OrcasDslPackage.FOREIGN_KEY__CONS_NAME: return CONS_NAME_EDEFAULT == null ? consName != null : !CONS_NAME_EDEFAULT.equals(consName); case OrcasDslPackage.FOREIGN_KEY__SRC_COLUMNS: return srcColumns != null && !srcColumns.isEmpty(); case OrcasDslPackage.FOREIGN_KEY__DEST_TABLE: return DEST_TABLE_EDEFAULT == null ? destTable != null : !DEST_TABLE_EDEFAULT.equals(destTable); case OrcasDslPackage.FOREIGN_KEY__DEST_COLUMNS: return destColumns != null && !destColumns.isEmpty(); case OrcasDslPackage.FOREIGN_KEY__DELETE_RULE: return delete_rule != DELETE_RULE_EDEFAULT; case OrcasDslPackage.FOREIGN_KEY__DEFERRTYPE: return deferrtype != DEFERRTYPE_EDEFAULT; case OrcasDslPackage.FOREIGN_KEY__STATUS: return status != STATUS_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (consName: "); result.append(consName); result.append(", destTable: "); result.append(destTable); result.append(", delete_rule: "); result.append(delete_rule); result.append(", deferrtype: "); result.append(deferrtype); result.append(", status: "); result.append(status); result.append(')'); return result.toString(); } } //ForeignKeyImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy