de.opitzconsulting.orcasDsl.impl.UniqueKeyImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of orcas-domainextension-syex Show documentation
Show all versions of orcas-domainextension-syex Show documentation
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.EnableType;
import de.opitzconsulting.orcasDsl.OrcasDslPackage;
import de.opitzconsulting.orcasDsl.UniqueKey;
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 'Unique Key'.
*
*
* The following features are implemented:
*
*
* - {@link de.opitzconsulting.orcasDsl.impl.UniqueKeyImpl#getUk_columns Uk columns}
* - {@link de.opitzconsulting.orcasDsl.impl.UniqueKeyImpl#getIndexname Indexname}
* - {@link de.opitzconsulting.orcasDsl.impl.UniqueKeyImpl#getStatus Status}
*
*
* @generated
*/
public class UniqueKeyImpl extends IndexOrUniqueKeyImpl implements UniqueKey
{
/**
* The cached value of the '{@link #getUk_columns() Uk columns}' containment reference list.
*
*
* @see #getUk_columns()
* @generated
* @ordered
*/
public EList uk_columns;
/**
* 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;
/**
* 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 UniqueKeyImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
public EClass eStaticClass()
{
return OrcasDslPackage.Literals.UNIQUE_KEY;
}
/**
*
*
* @generated
*/
public EList getUk_columns()
{
if (uk_columns == null)
{
uk_columns = new EObjectContainmentEList(ColumnRef.class, this, OrcasDslPackage.UNIQUE_KEY__UK_COLUMNS);
}
return uk_columns;
}
/**
*
*
* @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.UNIQUE_KEY__INDEXNAME, oldIndexname, indexname));
}
/**
*
*
* @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.UNIQUE_KEY__STATUS, oldStatus, status));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case OrcasDslPackage.UNIQUE_KEY__UK_COLUMNS:
return ((InternalEList>)getUk_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.UNIQUE_KEY__UK_COLUMNS:
return getUk_columns();
case OrcasDslPackage.UNIQUE_KEY__INDEXNAME:
return getIndexname();
case OrcasDslPackage.UNIQUE_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.UNIQUE_KEY__UK_COLUMNS:
getUk_columns().clear();
getUk_columns().addAll((Collection extends ColumnRef>)newValue);
return;
case OrcasDslPackage.UNIQUE_KEY__INDEXNAME:
setIndexname((String)newValue);
return;
case OrcasDslPackage.UNIQUE_KEY__STATUS:
setStatus((EnableType)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case OrcasDslPackage.UNIQUE_KEY__UK_COLUMNS:
getUk_columns().clear();
return;
case OrcasDslPackage.UNIQUE_KEY__INDEXNAME:
setIndexname(INDEXNAME_EDEFAULT);
return;
case OrcasDslPackage.UNIQUE_KEY__STATUS:
setStatus(STATUS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case OrcasDslPackage.UNIQUE_KEY__UK_COLUMNS:
return uk_columns != null && !uk_columns.isEmpty();
case OrcasDslPackage.UNIQUE_KEY__INDEXNAME:
return INDEXNAME_EDEFAULT == null ? indexname != null : !INDEXNAME_EDEFAULT.equals(indexname);
case OrcasDslPackage.UNIQUE_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(" (indexname: ");
result.append(indexname);
result.append(", status: ");
result.append(status);
result.append(')');
return result.toString();
}
} //UniqueKeyImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy