| /* |
| * Copyright (c) 2012, 2013, 2015, 2016 Eike Stepper (Loehne, Germany) and others. |
| * 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: |
| * Eike Stepper - initial API and implementation |
| */ |
| package org.eclipse.emf.cdo.tests.hibernate.model.HibernateTest.impl; |
| |
| import org.eclipse.emf.cdo.tests.hibernate.model.HibernateTest.Bz356181_Main; |
| import org.eclipse.emf.cdo.tests.hibernate.model.HibernateTest.Bz356181_NonTransient; |
| import org.eclipse.emf.cdo.tests.hibernate.model.HibernateTest.HibernateTestPackage; |
| |
| 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.EObjectImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Bz356181 Non Transient</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.emf.cdo.tests.hibernate.model.HibernateTest.impl.Bz356181_NonTransientImpl#getMain <em>Main</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class Bz356181_NonTransientImpl extends EObjectImpl implements Bz356181_NonTransient |
| { |
| /** |
| * The cached value of the '{@link #getMain() <em>Main</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMain() |
| * @generated |
| * @ordered |
| */ |
| protected Bz356181_Main main; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected Bz356181_NonTransientImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return HibernateTestPackage.Literals.BZ356181_NON_TRANSIENT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Bz356181_Main getMain() |
| { |
| if (main != null && main.eIsProxy()) |
| { |
| InternalEObject oldMain = (InternalEObject)main; |
| main = (Bz356181_Main)eResolveProxy(oldMain); |
| if (main != oldMain) |
| { |
| if (eNotificationRequired()) |
| { |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, HibernateTestPackage.BZ356181_NON_TRANSIENT__MAIN, oldMain, main)); |
| } |
| } |
| } |
| return main; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Bz356181_Main basicGetMain() |
| { |
| return main; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMain(Bz356181_Main newMain) |
| { |
| Bz356181_Main oldMain = main; |
| main = newMain; |
| if (eNotificationRequired()) |
| { |
| eNotify(new ENotificationImpl(this, Notification.SET, HibernateTestPackage.BZ356181_NON_TRANSIENT__MAIN, oldMain, main)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) |
| { |
| case HibernateTestPackage.BZ356181_NON_TRANSIENT__MAIN: |
| if (resolve) |
| { |
| return getMain(); |
| } |
| return basicGetMain(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) |
| { |
| switch (featureID) |
| { |
| case HibernateTestPackage.BZ356181_NON_TRANSIENT__MAIN: |
| setMain((Bz356181_Main)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case HibernateTestPackage.BZ356181_NON_TRANSIENT__MAIN: |
| setMain((Bz356181_Main)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case HibernateTestPackage.BZ356181_NON_TRANSIENT__MAIN: |
| return main != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } // Bz356181_NonTransientImpl |