blob: 49eef98d488f33aa41e1bf5b1d9c833229bdb0ba [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2015-2021 Robert Bosch GmbH and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Generated using Eclipse EMF
*
* *******************************************************************************
*/
package org.eclipse.app4mc.amalthea.model.impl;
import org.eclipse.app4mc.amalthea.model.AmaltheaPackage;
import org.eclipse.app4mc.amalthea.model.EventChain;
import org.eclipse.app4mc.amalthea.model.EventChainReference;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Event Chain Reference</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.app4mc.amalthea.model.impl.EventChainReferenceImpl#getEventChain <em>Event Chain</em>}</li>
* </ul>
*
* @generated
*/
public class EventChainReferenceImpl extends BaseObjectImpl implements EventChainReference {
/**
* The cached value of the '{@link #getEventChain() <em>Event Chain</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEventChain()
* @generated
* @ordered
*/
protected EventChain eventChain;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EventChainReferenceImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return AmaltheaPackage.eINSTANCE.getEventChainReference();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EventChain getEventChain() {
if (eventChain != null && eventChain.eIsProxy()) {
InternalEObject oldEventChain = (InternalEObject)eventChain;
eventChain = (EventChain)eResolveProxy(oldEventChain);
if (eventChain != oldEventChain) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, AmaltheaPackage.EVENT_CHAIN_REFERENCE__EVENT_CHAIN, oldEventChain, eventChain));
}
}
return eventChain;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EventChain basicGetEventChain() {
return eventChain;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setEventChain(EventChain newEventChain) {
EventChain oldEventChain = eventChain;
eventChain = newEventChain;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AmaltheaPackage.EVENT_CHAIN_REFERENCE__EVENT_CHAIN, oldEventChain, eventChain));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AmaltheaPackage.EVENT_CHAIN_REFERENCE__EVENT_CHAIN:
if (resolve) return getEventChain();
return basicGetEventChain();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AmaltheaPackage.EVENT_CHAIN_REFERENCE__EVENT_CHAIN:
setEventChain((EventChain)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AmaltheaPackage.EVENT_CHAIN_REFERENCE__EVENT_CHAIN:
setEventChain((EventChain)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AmaltheaPackage.EVENT_CHAIN_REFERENCE__EVENT_CHAIN:
return eventChain != null;
}
return super.eIsSet(featureID);
}
} //EventChainReferenceImpl