de.opitzconsulting.orcasDsl.impl.PrimaryKeyImpl Maven / Gradle / Ivy
/**
*/
package de.opitzconsulting.orcasDsl.impl;
import de.opitzconsulting.orcasDsl.ColumnRef;
import de.opitzconsulting.orcasDsl.EnableType;
import de.opitzconsulting.orcasDsl.OrcasDslPackage;
import de.opitzconsulting.orcasDsl.PrimaryKey;
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 'Primary Key'.
*
*
* The following features are implemented:
*
*
* - {@link de.opitzconsulting.orcasDsl.impl.PrimaryKeyImpl#getConsName Cons Name}
* - {@link de.opitzconsulting.orcasDsl.impl.PrimaryKeyImpl#getPk_columns Pk columns}
* - {@link de.opitzconsulting.orcasDsl.impl.PrimaryKeyImpl#getStatus Status}
* - {@link de.opitzconsulting.orcasDsl.impl.PrimaryKeyImpl#getReverse Reverse}
* - {@link de.opitzconsulting.orcasDsl.impl.PrimaryKeyImpl#getTablespace Tablespace}
* - {@link de.opitzconsulting.orcasDsl.impl.PrimaryKeyImpl#getIndexname Indexname}
*
*
* @generated
*/
public class PrimaryKeyImpl extends MinimalEObjectImpl.Container implements PrimaryKey
{
/**
* 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 #getPk_columns() Pk columns}' containment reference list.
*
*
* @see #getPk_columns()
* @generated
* @ordered
*/
public EList pk_columns;
/**
* 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;
/**
* The default value of the '{@link #getReverse() Reverse}' attribute.
*
*
* @see #getReverse()
* @generated
* @ordered
*/
public static final String REVERSE_EDEFAULT = null;
/**
* The cached value of the '{@link #getReverse() Reverse}' attribute.
*
*
* @see #getReverse()
* @generated
* @ordered
*/
public String reverse = REVERSE_EDEFAULT;
/**
* The default value of the '{@link #getTablespace() Tablespace}' attribute.
*
*
* @see #getTablespace()
* @generated
* @ordered
*/
public static final String TABLESPACE_EDEFAULT = null;
/**
* The cached value of the '{@link #getTablespace() Tablespace}' attribute.
*
*
* @see #getTablespace()
* @generated
* @ordered
*/
public String tablespace = TABLESPACE_EDEFAULT;
/**
* The default value of the '{@link #getIndexname() Indexname}' attribute.
*
*
* @see #getIndexname()
* @generated
* @ordered
*/
public static final String INDEXNAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getIndexname() Indexname}' attribute.
*
*
* @see #getIndexname()
* @generated
* @ordered
*/
public String indexname = INDEXNAME_EDEFAULT;
/**
*
*
* @generated
*/
public PrimaryKeyImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
public EClass eStaticClass()
{
return OrcasDslPackage.Literals.PRIMARY_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.PRIMARY_KEY__CONS_NAME, oldConsName, consName));
}
/**
*
*
* @generated
*/
public EList getPk_columns()
{
if (pk_columns == null)
{
pk_columns = new EObjectContainmentEList(ColumnRef.class, this, OrcasDslPackage.PRIMARY_KEY__PK_COLUMNS);
}
return pk_columns;
}
/**
*
*
* @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.PRIMARY_KEY__STATUS, oldStatus, status));
}
/**
*
*
* @generated
*/
public String getReverse()
{
return reverse;
}
/**
*
*
* @generated
*/
public void setReverse(String newReverse)
{
String oldReverse = reverse;
reverse = newReverse;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.PRIMARY_KEY__REVERSE, oldReverse, reverse));
}
/**
*
*
* @generated
*/
public String getTablespace()
{
return tablespace;
}
/**
*
*
* @generated
*/
public void setTablespace(String newTablespace)
{
String oldTablespace = tablespace;
tablespace = newTablespace;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.PRIMARY_KEY__TABLESPACE, oldTablespace, tablespace));
}
/**
*
*
* @generated
*/
public String getIndexname()
{
return indexname;
}
/**
*
*
* @generated
*/
public void setIndexname(String newIndexname)
{
String oldIndexname = indexname;
indexname = newIndexname;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.PRIMARY_KEY__INDEXNAME, oldIndexname, indexname));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case OrcasDslPackage.PRIMARY_KEY__PK_COLUMNS:
return ((InternalEList>)getPk_columns()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case OrcasDslPackage.PRIMARY_KEY__CONS_NAME:
return getConsName();
case OrcasDslPackage.PRIMARY_KEY__PK_COLUMNS:
return getPk_columns();
case OrcasDslPackage.PRIMARY_KEY__STATUS:
return getStatus();
case OrcasDslPackage.PRIMARY_KEY__REVERSE:
return getReverse();
case OrcasDslPackage.PRIMARY_KEY__TABLESPACE:
return getTablespace();
case OrcasDslPackage.PRIMARY_KEY__INDEXNAME:
return getIndexname();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case OrcasDslPackage.PRIMARY_KEY__CONS_NAME:
setConsName((String)newValue);
return;
case OrcasDslPackage.PRIMARY_KEY__PK_COLUMNS:
getPk_columns().clear();
getPk_columns().addAll((Collection extends ColumnRef>)newValue);
return;
case OrcasDslPackage.PRIMARY_KEY__STATUS:
setStatus((EnableType)newValue);
return;
case OrcasDslPackage.PRIMARY_KEY__REVERSE:
setReverse((String)newValue);
return;
case OrcasDslPackage.PRIMARY_KEY__TABLESPACE:
setTablespace((String)newValue);
return;
case OrcasDslPackage.PRIMARY_KEY__INDEXNAME:
setIndexname((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case OrcasDslPackage.PRIMARY_KEY__CONS_NAME:
setConsName(CONS_NAME_EDEFAULT);
return;
case OrcasDslPackage.PRIMARY_KEY__PK_COLUMNS:
getPk_columns().clear();
return;
case OrcasDslPackage.PRIMARY_KEY__STATUS:
setStatus(STATUS_EDEFAULT);
return;
case OrcasDslPackage.PRIMARY_KEY__REVERSE:
setReverse(REVERSE_EDEFAULT);
return;
case OrcasDslPackage.PRIMARY_KEY__TABLESPACE:
setTablespace(TABLESPACE_EDEFAULT);
return;
case OrcasDslPackage.PRIMARY_KEY__INDEXNAME:
setIndexname(INDEXNAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case OrcasDslPackage.PRIMARY_KEY__CONS_NAME:
return CONS_NAME_EDEFAULT == null ? consName != null : !CONS_NAME_EDEFAULT.equals(consName);
case OrcasDslPackage.PRIMARY_KEY__PK_COLUMNS:
return pk_columns != null && !pk_columns.isEmpty();
case OrcasDslPackage.PRIMARY_KEY__STATUS:
return status != STATUS_EDEFAULT;
case OrcasDslPackage.PRIMARY_KEY__REVERSE:
return REVERSE_EDEFAULT == null ? reverse != null : !REVERSE_EDEFAULT.equals(reverse);
case OrcasDslPackage.PRIMARY_KEY__TABLESPACE:
return TABLESPACE_EDEFAULT == null ? tablespace != null : !TABLESPACE_EDEFAULT.equals(tablespace);
case OrcasDslPackage.PRIMARY_KEY__INDEXNAME:
return INDEXNAME_EDEFAULT == null ? indexname != null : !INDEXNAME_EDEFAULT.equals(indexname);
}
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(", status: ");
result.append(status);
result.append(", reverse: ");
result.append(reverse);
result.append(", tablespace: ");
result.append(tablespace);
result.append(", indexname: ");
result.append(indexname);
result.append(')');
return result.toString();
}
} //PrimaryKeyImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy