| /** |
| * <copyright> |
| * </copyright> |
| * |
| * $Id: EmployeeImpl.java,v 1.1 2006/08/14 05:08:59 mtaal Exp $ |
| */ |
| package extlibrary.impl; |
| |
| import extlibrary.Employee; |
| import extlibrary.ExtlibraryPackage; |
| |
| 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>Employee</b></em>'. <!-- |
| * end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link extlibrary.impl.EmployeeImpl#getManager <em>Manager</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @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 = null; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| protected EmployeeImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| 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 |
| */ |
| 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 |
| */ |
| 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 |
| */ |
| 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 |
| */ |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case ExtlibraryPackage.EMPLOYEE__MANAGER: |
| return manager != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } // EmployeeImpl |