org.nasdanika.models.party.impl.PartyImpl Maven / Gradle / Ivy
/**
*/
package org.nasdanika.models.party.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.InternalEList;
import org.nasdanika.models.party.ContactMethod;
import org.nasdanika.models.party.Party;
import org.nasdanika.models.party.PartyPackage;
import org.nasdanika.ncore.impl.DocumentedNamedStringIdentityImpl;
/**
*
* An implementation of the model object 'Party'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.models.party.impl.PartyImpl#getContactMethods Contact Methods}
*
*
* @generated
*/
public abstract class PartyImpl extends DocumentedNamedStringIdentityImpl implements Party {
/**
*
*
* @generated
*/
protected PartyImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return PartyPackage.Literals.PARTY;
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public EList getContactMethods() {
return (EList)eDynamicGet(PartyPackage.PARTY__CONTACT_METHODS, PartyPackage.Literals.PARTY__CONTACT_METHODS, true, true);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PartyPackage.PARTY__CONTACT_METHODS:
return ((InternalEList>)getContactMethods()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PartyPackage.PARTY__CONTACT_METHODS:
return getContactMethods();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PartyPackage.PARTY__CONTACT_METHODS:
getContactMethods().clear();
getContactMethods().addAll((Collection extends ContactMethod>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PartyPackage.PARTY__CONTACT_METHODS:
getContactMethods().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PartyPackage.PARTY__CONTACT_METHODS:
return !getContactMethods().isEmpty();
}
return super.eIsSet(featureID);
}
} //PartyImpl