/** * <copyright> * </copyright> * * $Id$ */ package org.obeonetwork.dsl.entityrelation.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.EObjectWithInverseResolvingEList; import org.eclipse.emf.ecore.util.InternalEList; import org.obeonetwork.dsl.entityrelation.Attribute; import org.obeonetwork.dsl.entityrelation.EntityRelationPackage; import org.obeonetwork.dsl.entityrelation.Identifier; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Identifier</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.obeonetwork.dsl.entityrelation.impl.IdentifierImpl#getAttributes <em>Attributes</em>}</li> * </ul> * </p> * * @generated */ public class IdentifierImpl extends NamedElementImpl implements Identifier { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IdentifierImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return EntityRelationPackage.Literals.IDENTIFIER; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") public EList<Attribute> getAttributes() { return (EList<Attribute>)eDynamicGet(EntityRelationPackage.IDENTIFIER__ATTRIBUTES, EntityRelationPackage.Literals.IDENTIFIER__ATTRIBUTES, true, true); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case EntityRelationPackage.IDENTIFIER__ATTRIBUTES: return ((InternalEList<InternalEObject>)(InternalEList<?>)getAttributes()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case EntityRelationPackage.IDENTIFIER__ATTRIBUTES: return ((InternalEList<?>)getAttributes()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EntityRelationPackage.IDENTIFIER__ATTRIBUTES: return getAttributes(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EntityRelationPackage.IDENTIFIER__ATTRIBUTES: getAttributes().clear(); getAttributes().addAll((Collection<? extends Attribute>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EntityRelationPackage.IDENTIFIER__ATTRIBUTES: getAttributes().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EntityRelationPackage.IDENTIFIER__ATTRIBUTES: return !getAttributes().isEmpty(); } return super.eIsSet(featureID); } } //IdentifierImpl