blob: c0bd443004c00f4d590d8d569ab33778ae35b04d [file] [log] [blame]
/**
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* 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
*
* Based on ideas from Xtext, Xtend, Xcore
*
* Contributors{
* Joerg Riegel - Initial implementation
*
*/
package org.eclipse.osbp.xtext.perspective.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.xtext.organizationdsl.Organization;
import org.eclipse.osbp.xtext.perspective.PerspectiveDslPackage;
import org.eclipse.osbp.xtext.perspective.PerspectiveOrganization;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Perspective Organization</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.osbp.xtext.perspective.impl.PerspectiveOrganizationImpl#getRef <em>Ref</em>}</li>
* </ul>
*
* @generated
*/
public class PerspectiveOrganizationImpl extends PerspectiveLazyResolverImpl implements PerspectiveOrganization {
/**
* The cached value of the '{@link #getRef() <em>Ref</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRef()
* @generated
* @ordered
*/
protected Organization ref;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PerspectiveOrganizationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PerspectiveDslPackage.Literals.PERSPECTIVE_ORGANIZATION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Organization getRef() {
if (ref != null && ref.eIsProxy()) {
InternalEObject oldRef = (InternalEObject)ref;
ref = (Organization)eResolveProxy(oldRef);
if (ref != oldRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, PerspectiveDslPackage.PERSPECTIVE_ORGANIZATION__REF, oldRef, ref));
}
}
return ref;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Organization basicGetRef() {
return ref;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setRef(Organization newRef) {
Organization oldRef = ref;
ref = newRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PerspectiveDslPackage.PERSPECTIVE_ORGANIZATION__REF, oldRef, ref));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PerspectiveDslPackage.PERSPECTIVE_ORGANIZATION__REF:
if (resolve) return getRef();
return basicGetRef();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PerspectiveDslPackage.PERSPECTIVE_ORGANIZATION__REF:
setRef((Organization)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PerspectiveDslPackage.PERSPECTIVE_ORGANIZATION__REF:
setRef((Organization)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PerspectiveDslPackage.PERSPECTIVE_ORGANIZATION__REF:
return ref != null;
}
return super.eIsSet(featureID);
}
} //PerspectiveOrganizationImpl