| /** |
| * 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 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * 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.DatamartSetAggregationFunction; |
| |
| import org.eclipse.osbp.xtext.table.TableAggregation; |
| import org.eclipse.osbp.xtext.table.TableDSLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Table Aggregation</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.table.impl.TableAggregationImpl#getValueRef <em>Value Ref</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class TableAggregationImpl extends ExpressionImpl implements TableAggregation { |
| /** |
| * The cached value of the '{@link #getValueRef() <em>Value Ref</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueRef() |
| * @generated |
| * @ordered |
| */ |
| protected DatamartSetAggregationFunction valueRef; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected TableAggregationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return TableDSLPackage.Literals.TABLE_AGGREGATION; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DatamartSetAggregationFunction getValueRef() { |
| if (valueRef != null && valueRef.eIsProxy()) { |
| InternalEObject oldValueRef = (InternalEObject)valueRef; |
| valueRef = (DatamartSetAggregationFunction)eResolveProxy(oldValueRef); |
| if (valueRef != oldValueRef) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TableDSLPackage.TABLE_AGGREGATION__VALUE_REF, oldValueRef, valueRef)); |
| } |
| } |
| return valueRef; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DatamartSetAggregationFunction basicGetValueRef() { |
| return valueRef; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueRef(DatamartSetAggregationFunction newValueRef) { |
| DatamartSetAggregationFunction oldValueRef = valueRef; |
| valueRef = newValueRef; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TableDSLPackage.TABLE_AGGREGATION__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_AGGREGATION__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_AGGREGATION__VALUE_REF: |
| setValueRef((DatamartSetAggregationFunction)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_AGGREGATION__VALUE_REF: |
| setValueRef((DatamartSetAggregationFunction)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_AGGREGATION__VALUE_REF: |
| return valueRef != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //TableAggregationImpl |