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