blob: 9f43d9f35f98729a03dc8fff28d709e92bca8e52 [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
* 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.CallProcess;
import org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.pdp4engDesignPackage;
import org.eclipse.uml2.uml.CallBehaviorAction;
import org.eclipse.uml2.uml.OpaqueAction;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Call Process</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl.CallProcessImpl#getBase_CallBehaviorAction <em>Base Call Behavior Action</em>}</li>
* <li>{@link org.eclipse.papyrus.pdp4eng.designer.profile.pdp4engDesign.impl.CallProcessImpl#getBase_OpaqueAction <em>Base Opaque Action</em>}</li>
* </ul>
*
* @generated
*/
public class CallProcessImpl extends MinimalEObjectImpl.Container implements CallProcess {
/**
* The cached value of the '{@link #getBase_CallBehaviorAction() <em>Base Call Behavior Action</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_CallBehaviorAction()
* @generated
* @ordered
*/
protected CallBehaviorAction base_CallBehaviorAction;
/**
* The cached value of the '{@link #getBase_OpaqueAction() <em>Base Opaque Action</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBase_OpaqueAction()
* @generated
* @ordered
*/
protected OpaqueAction base_OpaqueAction;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CallProcessImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return pdp4engDesignPackage.Literals.CALL_PROCESS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public CallBehaviorAction getBase_CallBehaviorAction() {
if (base_CallBehaviorAction != null && base_CallBehaviorAction.eIsProxy()) {
InternalEObject oldBase_CallBehaviorAction = (InternalEObject)base_CallBehaviorAction;
base_CallBehaviorAction = (CallBehaviorAction)eResolveProxy(oldBase_CallBehaviorAction);
if (base_CallBehaviorAction != oldBase_CallBehaviorAction) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, pdp4engDesignPackage.CALL_PROCESS__BASE_CALL_BEHAVIOR_ACTION, oldBase_CallBehaviorAction, base_CallBehaviorAction));
}
}
return base_CallBehaviorAction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CallBehaviorAction basicGetBase_CallBehaviorAction() {
return base_CallBehaviorAction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setBase_CallBehaviorAction(CallBehaviorAction newBase_CallBehaviorAction) {
CallBehaviorAction oldBase_CallBehaviorAction = base_CallBehaviorAction;
base_CallBehaviorAction = newBase_CallBehaviorAction;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, pdp4engDesignPackage.CALL_PROCESS__BASE_CALL_BEHAVIOR_ACTION, oldBase_CallBehaviorAction, base_CallBehaviorAction));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public OpaqueAction getBase_OpaqueAction() {
if (base_OpaqueAction != null && base_OpaqueAction.eIsProxy()) {
InternalEObject oldBase_OpaqueAction = (InternalEObject)base_OpaqueAction;
base_OpaqueAction = (OpaqueAction)eResolveProxy(oldBase_OpaqueAction);
if (base_OpaqueAction != oldBase_OpaqueAction) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, pdp4engDesignPackage.CALL_PROCESS__BASE_OPAQUE_ACTION, oldBase_OpaqueAction, base_OpaqueAction));
}
}
return base_OpaqueAction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public OpaqueAction basicGetBase_OpaqueAction() {
return base_OpaqueAction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setBase_OpaqueAction(OpaqueAction newBase_OpaqueAction) {
OpaqueAction oldBase_OpaqueAction = base_OpaqueAction;
base_OpaqueAction = newBase_OpaqueAction;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, pdp4engDesignPackage.CALL_PROCESS__BASE_OPAQUE_ACTION, oldBase_OpaqueAction, base_OpaqueAction));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case pdp4engDesignPackage.CALL_PROCESS__BASE_CALL_BEHAVIOR_ACTION:
if (resolve) return getBase_CallBehaviorAction();
return basicGetBase_CallBehaviorAction();
case pdp4engDesignPackage.CALL_PROCESS__BASE_OPAQUE_ACTION:
if (resolve) return getBase_OpaqueAction();
return basicGetBase_OpaqueAction();
}
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.CALL_PROCESS__BASE_CALL_BEHAVIOR_ACTION:
setBase_CallBehaviorAction((CallBehaviorAction)newValue);
return;
case pdp4engDesignPackage.CALL_PROCESS__BASE_OPAQUE_ACTION:
setBase_OpaqueAction((OpaqueAction)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case pdp4engDesignPackage.CALL_PROCESS__BASE_CALL_BEHAVIOR_ACTION:
setBase_CallBehaviorAction((CallBehaviorAction)null);
return;
case pdp4engDesignPackage.CALL_PROCESS__BASE_OPAQUE_ACTION:
setBase_OpaqueAction((OpaqueAction)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case pdp4engDesignPackage.CALL_PROCESS__BASE_CALL_BEHAVIOR_ACTION:
return base_CallBehaviorAction != null;
case pdp4engDesignPackage.CALL_PROCESS__BASE_OPAQUE_ACTION:
return base_OpaqueAction != null;
}
return super.eIsSet(featureID);
}
} //CallProcessImpl