org.openxma.dsl.ddl.ddlDsl.impl.DdlImpl Maven / Gradle / Ivy
The newest version!
/**
*
*
*
*/
package org.openxma.dsl.ddl.ddlDsl.impl;
import java.util.Collection;
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.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.openxma.dsl.ddl.ddlDsl.Ddl;
import org.openxma.dsl.ddl.ddlDsl.DdlDslPackage;
import org.openxma.dsl.ddl.ddlDsl.DdlStatement;
/**
*
* An implementation of the model object 'Ddl'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.ddl.ddlDsl.impl.DdlImpl#getStatements Statements}
*
*
*
* @generated
*/
public class DdlImpl extends MinimalEObjectImpl.Container implements Ddl
{
/**
* The cached value of the '{@link #getStatements() Statements}' containment reference list.
*
*
* @see #getStatements()
* @generated
* @ordered
*/
protected EList statements;
/**
*
*
* @generated
*/
protected DdlImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return DdlDslPackage.Literals.DDL;
}
/**
*
*
* @generated
*/
public EList getStatements()
{
if (statements == null) {
statements = new EObjectContainmentEList(DdlStatement.class, this, DdlDslPackage.DDL__STATEMENTS);
}
return statements;
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID) {
case DdlDslPackage.DDL__STATEMENTS:
return ((InternalEList>)getStatements()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID) {
case DdlDslPackage.DDL__STATEMENTS:
return getStatements();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID) {
case DdlDslPackage.DDL__STATEMENTS:
getStatements().clear();
getStatements().addAll((Collection extends DdlStatement>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID) {
case DdlDslPackage.DDL__STATEMENTS:
getStatements().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID) {
case DdlDslPackage.DDL__STATEMENTS:
return statements != null && !statements.isEmpty();
}
return super.eIsSet(featureID);
}
} //DdlImpl