| /** |
| */ |
| package org.eclipse.papyrus.bpmn.BPMNProfile.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.papyrus.bpmn.BPMNProfile.Assignment; |
| import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNExpression; |
| import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNProfilePackage; |
| import org.eclipse.uml2.uml.Dependency; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Assignment</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.AssignmentImpl#getBase_Dependency <em>Base Dependency</em>}</li> |
| * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.AssignmentImpl#getFrom <em>From</em>}</li> |
| * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.AssignmentImpl#getTo <em>To</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class AssignmentImpl extends BaseElementImpl implements Assignment { |
| /** |
| * The cached value of the '{@link #getBase_Dependency() <em>Base Dependency</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBase_Dependency() |
| * @generated |
| * @ordered |
| */ |
| protected Dependency base_Dependency; |
| |
| /** |
| * The cached value of the '{@link #getFrom() <em>From</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFrom() |
| * @generated |
| * @ordered |
| */ |
| protected BPMNExpression from; |
| /** |
| * The cached value of the '{@link #getTo() <em>To</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getTo() |
| * @generated |
| * @ordered |
| */ |
| protected BPMNExpression to; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected AssignmentImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return BPMNProfilePackage.eINSTANCE.getAssignment(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Dependency getBase_Dependency() { |
| if (base_Dependency != null && base_Dependency.eIsProxy()) { |
| InternalEObject oldBase_Dependency = (InternalEObject)base_Dependency; |
| base_Dependency = (Dependency)eResolveProxy(oldBase_Dependency); |
| if (base_Dependency != oldBase_Dependency) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.ASSIGNMENT__BASE_DEPENDENCY, oldBase_Dependency, base_Dependency)); |
| } |
| } |
| return base_Dependency; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Dependency basicGetBase_Dependency() { |
| return base_Dependency; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBase_Dependency(Dependency newBase_Dependency) { |
| Dependency oldBase_Dependency = base_Dependency; |
| base_Dependency = newBase_Dependency; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.ASSIGNMENT__BASE_DEPENDENCY, oldBase_Dependency, base_Dependency)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public BPMNExpression getFrom() { |
| if (from != null && from.eIsProxy()) { |
| InternalEObject oldFrom = (InternalEObject)from; |
| from = (BPMNExpression)eResolveProxy(oldFrom); |
| if (from != oldFrom) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.ASSIGNMENT__FROM, oldFrom, from)); |
| } |
| } |
| return from; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public BPMNExpression basicGetFrom() { |
| return from; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFrom(BPMNExpression newFrom) { |
| BPMNExpression oldFrom = from; |
| from = newFrom; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.ASSIGNMENT__FROM, oldFrom, from)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public BPMNExpression getTo() { |
| if (to != null && to.eIsProxy()) { |
| InternalEObject oldTo = (InternalEObject)to; |
| to = (BPMNExpression)eResolveProxy(oldTo); |
| if (to != oldTo) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.ASSIGNMENT__TO, oldTo, to)); |
| } |
| } |
| return to; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public BPMNExpression basicGetTo() { |
| return to; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setTo(BPMNExpression newTo) { |
| BPMNExpression oldTo = to; |
| to = newTo; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.ASSIGNMENT__TO, oldTo, to)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case BPMNProfilePackage.ASSIGNMENT__BASE_DEPENDENCY: |
| if (resolve) return getBase_Dependency(); |
| return basicGetBase_Dependency(); |
| case BPMNProfilePackage.ASSIGNMENT__FROM: |
| if (resolve) return getFrom(); |
| return basicGetFrom(); |
| case BPMNProfilePackage.ASSIGNMENT__TO: |
| if (resolve) return getTo(); |
| return basicGetTo(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case BPMNProfilePackage.ASSIGNMENT__BASE_DEPENDENCY: |
| setBase_Dependency((Dependency)newValue); |
| return; |
| case BPMNProfilePackage.ASSIGNMENT__FROM: |
| setFrom((BPMNExpression)newValue); |
| return; |
| case BPMNProfilePackage.ASSIGNMENT__TO: |
| setTo((BPMNExpression)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case BPMNProfilePackage.ASSIGNMENT__BASE_DEPENDENCY: |
| setBase_Dependency((Dependency)null); |
| return; |
| case BPMNProfilePackage.ASSIGNMENT__FROM: |
| setFrom((BPMNExpression)null); |
| return; |
| case BPMNProfilePackage.ASSIGNMENT__TO: |
| setTo((BPMNExpression)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case BPMNProfilePackage.ASSIGNMENT__BASE_DEPENDENCY: |
| return base_Dependency != null; |
| case BPMNProfilePackage.ASSIGNMENT__FROM: |
| return from != null; |
| case BPMNProfilePackage.ASSIGNMENT__TO: |
| return to != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //AssignmentImpl |