| /** |
| * 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.table.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.datamartdsl.DatamartAttribute; |
| |
| import org.eclipse.osbp.xtext.table.TableAttribute; |
| import org.eclipse.osbp.xtext.table.TableDSLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Table Attribute</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.table.impl.TableAttributeImpl#getValueRef <em>Value Ref</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class TableAttributeImpl extends ExpressionImpl implements TableAttribute { |
| /** |
| * The cached value of the '{@link #getValueRef() <em>Value Ref</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueRef() |
| * @generated |
| * @ordered |
| */ |
| protected DatamartAttribute valueRef; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected TableAttributeImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return TableDSLPackage.Literals.TABLE_ATTRIBUTE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DatamartAttribute getValueRef() { |
| if (valueRef != null && valueRef.eIsProxy()) { |
| InternalEObject oldValueRef = (InternalEObject)valueRef; |
| valueRef = (DatamartAttribute)eResolveProxy(oldValueRef); |
| if (valueRef != oldValueRef) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TableDSLPackage.TABLE_ATTRIBUTE__VALUE_REF, oldValueRef, valueRef)); |
| } |
| } |
| return valueRef; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DatamartAttribute basicGetValueRef() { |
| return valueRef; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueRef(DatamartAttribute newValueRef) { |
| DatamartAttribute oldValueRef = valueRef; |
| valueRef = newValueRef; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TableDSLPackage.TABLE_ATTRIBUTE__VALUE_REF, oldValueRef, valueRef)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_ATTRIBUTE__VALUE_REF: |
| if (resolve) return getValueRef(); |
| return basicGetValueRef(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_ATTRIBUTE__VALUE_REF: |
| setValueRef((DatamartAttribute)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_ATTRIBUTE__VALUE_REF: |
| setValueRef((DatamartAttribute)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_ATTRIBUTE__VALUE_REF: |
| return valueRef != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //TableAttributeImpl |