org.openxma.dsl.ddl.ddlDsl.impl.DropTableConstraintImpl Maven / Gradle / Ivy
/**
*
*
*
*/
package org.openxma.dsl.ddl.ddlDsl.impl;
import org.eclipse.emf.common.notify.Notification;
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.Constraint;
import org.openxma.dsl.ddl.ddlDsl.DdlDslPackage;
import org.openxma.dsl.ddl.ddlDsl.DropTableConstraint;
/**
*
* An implementation of the model object 'Drop Table Constraint'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.ddl.ddlDsl.impl.DropTableConstraintImpl#getConstraintRef Constraint Ref}
*
*
*
* @generated
*/
public class DropTableConstraintImpl extends AlterTableActionImpl implements DropTableConstraint
{
/**
* The cached value of the '{@link #getConstraintRef() Constraint Ref}' reference.
*
*
* @see #getConstraintRef()
* @generated
* @ordered
*/
protected Constraint constraintRef;
/**
*
*
* @generated
*/
protected DropTableConstraintImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return DdlDslPackage.Literals.DROP_TABLE_CONSTRAINT;
}
/**
*
*
* @generated
*/
public Constraint getConstraintRef()
{
if (constraintRef != null && constraintRef.eIsProxy()) {
InternalEObject oldConstraintRef = (InternalEObject)constraintRef;
constraintRef = (Constraint)eResolveProxy(oldConstraintRef);
if (constraintRef != oldConstraintRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DdlDslPackage.DROP_TABLE_CONSTRAINT__CONSTRAINT_REF, oldConstraintRef, constraintRef));
}
}
return constraintRef;
}
/**
*
*
* @generated
*/
public Constraint basicGetConstraintRef()
{
return constraintRef;
}
/**
*
*
* @generated
*/
public void setConstraintRef(Constraint newConstraintRef)
{
Constraint oldConstraintRef = constraintRef;
constraintRef = newConstraintRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.DROP_TABLE_CONSTRAINT__CONSTRAINT_REF, oldConstraintRef, constraintRef));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID) {
case DdlDslPackage.DROP_TABLE_CONSTRAINT__CONSTRAINT_REF:
if (resolve) return getConstraintRef();
return basicGetConstraintRef();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID) {
case DdlDslPackage.DROP_TABLE_CONSTRAINT__CONSTRAINT_REF:
setConstraintRef((Constraint)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID) {
case DdlDslPackage.DROP_TABLE_CONSTRAINT__CONSTRAINT_REF:
setConstraintRef((Constraint)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID) {
case DdlDslPackage.DROP_TABLE_CONSTRAINT__CONSTRAINT_REF:
return constraintRef != null;
}
return super.eIsSet(featureID);
}
} //DropTableConstraintImpl