| /** |
| * Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (Heidelberg) |
| * 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: |
| * Florian Pirchner - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.dsl.semantic.dto.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.osbp.dsl.semantic.dto.LDtoReference; |
| import org.eclipse.osbp.dsl.semantic.dto.OSBPDtoPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>LDto Reference</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.dsl.semantic.dto.impl.LDtoReferenceImpl#getOpposite <em>Opposite</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class LDtoReferenceImpl extends LDtoAbstractReferenceImpl implements LDtoReference { |
| /** |
| * The cached value of the '{@link #getOpposite() <em>Opposite</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOpposite() |
| * @generated |
| * @ordered |
| */ |
| protected LDtoReference opposite; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected LDtoReferenceImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return OSBPDtoPackage.Literals.LDTO_REFERENCE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public LDtoReference getOpposite() { |
| if (opposite != null && opposite.eIsProxy()) { |
| InternalEObject oldOpposite = (InternalEObject)opposite; |
| opposite = (LDtoReference)eResolveProxy(oldOpposite); |
| if (opposite != oldOpposite) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, OSBPDtoPackage.LDTO_REFERENCE__OPPOSITE, oldOpposite, opposite)); |
| } |
| } |
| return opposite; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public LDtoReference basicGetOpposite() { |
| return opposite; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOpposite(LDtoReference newOpposite) { |
| LDtoReference oldOpposite = opposite; |
| opposite = newOpposite; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, OSBPDtoPackage.LDTO_REFERENCE__OPPOSITE, oldOpposite, opposite)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case OSBPDtoPackage.LDTO_REFERENCE__OPPOSITE: |
| if (resolve) return getOpposite(); |
| return basicGetOpposite(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case OSBPDtoPackage.LDTO_REFERENCE__OPPOSITE: |
| setOpposite((LDtoReference)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case OSBPDtoPackage.LDTO_REFERENCE__OPPOSITE: |
| setOpposite((LDtoReference)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case OSBPDtoPackage.LDTO_REFERENCE__OPPOSITE: |
| return opposite != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //LDtoReferenceImpl |