/** | |
* Copyright (c)2020 CEA LIST, Committer Name, and others. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License 2.0 | |
* which accompanies this distribution, and is available at | |
* https://www.eclipse.org/legal/epl-2.0/ | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
* Contributors: | |
* CEA LIST - Initial API and implementation | |
* Gabriel Pedroza (CEA LIST) gabriel.pedroza@cea.fr | |
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr | |
* | |
*/ | |
package org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl; | |
import org.eclipse.emf.common.notify.Notification; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.InternalEObject; | |
import org.eclipse.emf.ecore.impl.ENotificationImpl; | |
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.DataStore; | |
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.pdp4engDesignPackage; | |
import org.eclipse.uml2.uml.DataStoreNode; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Data Store</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* </p> | |
* <ul> | |
* <li>{@link org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl.DataStoreImpl#getBase_DataStoreNode <em>Base Data Store Node</em>}</li> | |
* </ul> | |
* | |
* @generated | |
*/ | |
public class DataStoreImpl extends MinimalEObjectImpl.Container implements DataStore { | |
/** | |
* The cached value of the '{@link #getBase_DataStoreNode() <em>Base Data Store Node</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getBase_DataStoreNode() | |
* @generated | |
* @ordered | |
*/ | |
protected DataStoreNode base_DataStoreNode; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected DataStoreImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return pdp4engDesignPackage.Literals.DATA_STORE; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public DataStoreNode getBase_DataStoreNode() { | |
if (base_DataStoreNode != null && base_DataStoreNode.eIsProxy()) { | |
InternalEObject oldBase_DataStoreNode = (InternalEObject)base_DataStoreNode; | |
base_DataStoreNode = (DataStoreNode)eResolveProxy(oldBase_DataStoreNode); | |
if (base_DataStoreNode != oldBase_DataStoreNode) { | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.RESOLVE, pdp4engDesignPackage.DATA_STORE__BASE_DATA_STORE_NODE, oldBase_DataStoreNode, base_DataStoreNode)); | |
} | |
} | |
return base_DataStoreNode; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public DataStoreNode basicGetBase_DataStoreNode() { | |
return base_DataStoreNode; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void setBase_DataStoreNode(DataStoreNode newBase_DataStoreNode) { | |
DataStoreNode oldBase_DataStoreNode = base_DataStoreNode; | |
base_DataStoreNode = newBase_DataStoreNode; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, pdp4engDesignPackage.DATA_STORE__BASE_DATA_STORE_NODE, oldBase_DataStoreNode, base_DataStoreNode)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_STORE__BASE_DATA_STORE_NODE: | |
if (resolve) return getBase_DataStoreNode(); | |
return basicGetBase_DataStoreNode(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_STORE__BASE_DATA_STORE_NODE: | |
setBase_DataStoreNode((DataStoreNode)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_STORE__BASE_DATA_STORE_NODE: | |
setBase_DataStoreNode((DataStoreNode)null); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case pdp4engDesignPackage.DATA_STORE__BASE_DATA_STORE_NODE: | |
return base_DataStoreNode != null; | |
} | |
return super.eIsSet(featureID); | |
} | |
} //DataStoreImpl |