blob: a31792dec68fb312810f641d67f7527f9c513e75 [file] [log] [blame]
/**
* 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
* Patrick Tessier (CEA LIST) patrick.tessier@cea.fr
* Gabriel Pedroza (CEA LIST) gabriel.pedroza@cea.fr
*
*/
package org.eclipse.papyrus.pdp4eng.common.profile.pdp4engCommonGDPR.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.common.profile.pdp4engCommonGDPR.Pdp4engCommonGDPRPackage;
import org.eclipse.papyrus.pdp4eng.common.profile.pdp4engCommonGDPR.PublicInterest;
import org.eclipse.uml2.uml.NamedElement;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Public Interest</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.papyrus.pdp4eng.common.profile.pdp4engCommonGDPR.impl.PublicInterestImpl#getBase_NamedElement <em>Base Named Element</em>}</li>
* </ul>
*
* @generated
*/
public class PublicInterestImpl extends MinimalEObjectImpl.Container implements PublicInterest {
/**
* The cached value of the '{@link #getBase_NamedElement() <em>Base Named Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_NamedElement()
* @generated
* @ordered
*/
protected NamedElement base_NamedElement;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PublicInterestImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return Pdp4engCommonGDPRPackage.Literals.PUBLIC_INTEREST;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NamedElement getBase_NamedElement() {
if (base_NamedElement != null && base_NamedElement.eIsProxy()) {
InternalEObject oldBase_NamedElement = (InternalEObject)base_NamedElement;
base_NamedElement = (NamedElement)eResolveProxy(oldBase_NamedElement);
if (base_NamedElement != oldBase_NamedElement) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Pdp4engCommonGDPRPackage.PUBLIC_INTEREST__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement));
}
}
return base_NamedElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NamedElement basicGetBase_NamedElement() {
return base_NamedElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setBase_NamedElement(NamedElement newBase_NamedElement) {
NamedElement oldBase_NamedElement = base_NamedElement;
base_NamedElement = newBase_NamedElement;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Pdp4engCommonGDPRPackage.PUBLIC_INTEREST__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Pdp4engCommonGDPRPackage.PUBLIC_INTEREST__BASE_NAMED_ELEMENT:
if (resolve) return getBase_NamedElement();
return basicGetBase_NamedElement();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Pdp4engCommonGDPRPackage.PUBLIC_INTEREST__BASE_NAMED_ELEMENT:
setBase_NamedElement((NamedElement)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Pdp4engCommonGDPRPackage.PUBLIC_INTEREST__BASE_NAMED_ELEMENT:
setBase_NamedElement((NamedElement)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Pdp4engCommonGDPRPackage.PUBLIC_INTEREST__BASE_NAMED_ELEMENT:
return base_NamedElement != null;
}
return super.eIsSet(featureID);
}
} //PublicInterestImpl