/**
* <copyright>
* </copyright>
*
* $Id$
*/
package fr.inria.atlanmod.collaboro.history.impl;
import fr.inria.atlanmod.collaboro.history.HistoryPackage;
import fr.inria.atlanmod.collaboro.history.MetaInfo;
import fr.inria.atlanmod.collaboro.history.Proposal;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Meta Info</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link fr.inria.atlanmod.collaboro.history.impl.MetaInfoImpl#getProposal <em>Proposal</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public abstract class MetaInfoImpl extends CDOObjectImpl implements MetaInfo {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MetaInfoImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return HistoryPackage.Literals.META_INFO;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected int eStaticFeatureCount() {
return 0;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Proposal getProposal() {
return (Proposal)eDynamicGet(HistoryPackage.META_INFO__PROPOSAL, HistoryPackage.Literals.META_INFO__PROPOSAL, true, true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetProposal(Proposal newProposal, NotificationChain msgs) {
msgs = eBasicSetContainer((InternalEObject)newProposal, HistoryPackage.META_INFO__PROPOSAL, msgs);
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setProposal(Proposal newProposal) {
eDynamicSet(HistoryPackage.META_INFO__PROPOSAL, HistoryPackage.Literals.META_INFO__PROPOSAL, newProposal);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case HistoryPackage.META_INFO__PROPOSAL:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
return basicSetProposal((Proposal)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 HistoryPackage.META_INFO__PROPOSAL:
return basicSetProposal(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
switch (eContainerFeatureID()) {
case HistoryPackage.META_INFO__PROPOSAL:
return eInternalContainer().eInverseRemove(this, HistoryPackage.PROPOSAL__META, Proposal.class, msgs);
}
return super.eBasicRemoveFromContainerFeature(msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case HistoryPackage.META_INFO__PROPOSAL:
return getProposal();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case HistoryPackage.META_INFO__PROPOSAL:
setProposal((Proposal)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case HistoryPackage.META_INFO__PROPOSAL:
setProposal((Proposal)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case HistoryPackage.META_INFO__PROPOSAL:
return getProposal() != null;
}
return super.eIsSet(featureID);
}
} //MetaInfoImpl