| /** |
| * Copyright (c) 2019 Obeo. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Obeo - initial API and implementation |
| */ |
| package org.eclipse.sirius.tests.services.graphql.extlibrary.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.sirius.tests.services.graphql.extlibrary.Employee; |
| import org.eclipse.sirius.tests.services.graphql.extlibrary.ExtlibraryPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Employee</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.sirius.tests.services.graphql.extlibrary.impl.EmployeeImpl#getManager <em>Manager</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class EmployeeImpl extends PersonImpl implements Employee { |
| /** |
| * The cached value of the '{@link #getManager() <em>Manager</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getManager() |
| * @generated |
| * @ordered |
| */ |
| protected Employee manager; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected EmployeeImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return ExtlibraryPackage.Literals.EMPLOYEE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Employee getManager() { |
| if (manager != null && manager.eIsProxy()) { |
| InternalEObject oldManager = (InternalEObject)manager; |
| manager = (Employee)eResolveProxy(oldManager); |
| if (manager != oldManager) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExtlibraryPackage.EMPLOYEE__MANAGER, oldManager, manager)); |
| } |
| } |
| return manager; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Employee basicGetManager() { |
| return manager; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setManager(Employee newManager) { |
| Employee oldManager = manager; |
| manager = newManager; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, ExtlibraryPackage.EMPLOYEE__MANAGER, oldManager, manager)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case ExtlibraryPackage.EMPLOYEE__MANAGER: |
| if (resolve) return getManager(); |
| return basicGetManager(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case ExtlibraryPackage.EMPLOYEE__MANAGER: |
| setManager((Employee)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case ExtlibraryPackage.EMPLOYEE__MANAGER: |
| setManager((Employee)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ExtlibraryPackage.EMPLOYEE__MANAGER: |
| return manager != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //EmployeeImpl |