org.nasdanika.models.architecture.impl.PartyActorImpl Maven / Gradle / Ivy
The newest version!
/**
*/
package org.nasdanika.models.architecture.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.architecture.ArchitecturePackage;
import org.nasdanika.models.architecture.PartyActor;
import org.nasdanika.models.party.ContactMethod;
import org.nasdanika.models.party.Party;
import org.nasdanika.models.party.PartyPackage;
import org.nasdanika.ncore.DocumentedNamedStringIdentity;
/**
*
* An implementation of the model object 'Party Actor'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.models.architecture.impl.PartyActorImpl#getContactMethods Contact Methods}
*
*
* @generated
*/
public class PartyActorImpl extends ActorImpl implements PartyActor {
/**
*
*
* @generated
*/
protected PartyActorImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return ArchitecturePackage.Literals.PARTY_ACTOR;
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public EList getContactMethods() {
return (EList)eDynamicGet(ArchitecturePackage.PARTY_ACTOR__CONTACT_METHODS, PartyPackage.Literals.PARTY__CONTACT_METHODS, true, true);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ArchitecturePackage.PARTY_ACTOR__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 ArchitecturePackage.PARTY_ACTOR__CONTACT_METHODS:
return getContactMethods();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ArchitecturePackage.PARTY_ACTOR__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 ArchitecturePackage.PARTY_ACTOR__CONTACT_METHODS:
getContactMethods().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ArchitecturePackage.PARTY_ACTOR__CONTACT_METHODS:
return !getContactMethods().isEmpty();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
if (baseClass == DocumentedNamedStringIdentity.class) {
switch (derivedFeatureID) {
default: return -1;
}
}
if (baseClass == Party.class) {
switch (derivedFeatureID) {
case ArchitecturePackage.PARTY_ACTOR__CONTACT_METHODS: return PartyPackage.PARTY__CONTACT_METHODS;
default: return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
*
*
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
if (baseClass == DocumentedNamedStringIdentity.class) {
switch (baseFeatureID) {
default: return -1;
}
}
if (baseClass == Party.class) {
switch (baseFeatureID) {
case PartyPackage.PARTY__CONTACT_METHODS: return ArchitecturePackage.PARTY_ACTOR__CONTACT_METHODS;
default: return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
} //PartyActorImpl