| /** |
| * 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.datamartdsl.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartColumn; |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartDSLPackage; |
| import org.eclipse.osbp.xtext.datamartdsl.TaskQueryColumnEnum; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Datamart Column</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.datamartdsl.impl.DatamartColumnImpl#getColumnRef <em>Column Ref</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class DatamartColumnImpl extends ExpressionImpl implements DatamartColumn { |
| /** |
| * The default value of the '{@link #getColumnRef() <em>Column Ref</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColumnRef() |
| * @generated |
| * @ordered |
| */ |
| protected static final TaskQueryColumnEnum COLUMN_REF_EDEFAULT = TaskQueryColumnEnum.P1; |
| |
| /** |
| * The cached value of the '{@link #getColumnRef() <em>Column Ref</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColumnRef() |
| * @generated |
| * @ordered |
| */ |
| protected TaskQueryColumnEnum columnRef = COLUMN_REF_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected DatamartColumnImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return DatamartDSLPackage.Literals.DATAMART_COLUMN; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public TaskQueryColumnEnum getColumnRef() { |
| return columnRef; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setColumnRef(TaskQueryColumnEnum newColumnRef) { |
| TaskQueryColumnEnum oldColumnRef = columnRef; |
| columnRef = newColumnRef == null ? COLUMN_REF_EDEFAULT : newColumnRef; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, DatamartDSLPackage.DATAMART_COLUMN__COLUMN_REF, oldColumnRef, columnRef)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case DatamartDSLPackage.DATAMART_COLUMN__COLUMN_REF: |
| return getColumnRef(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case DatamartDSLPackage.DATAMART_COLUMN__COLUMN_REF: |
| setColumnRef((TaskQueryColumnEnum)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case DatamartDSLPackage.DATAMART_COLUMN__COLUMN_REF: |
| setColumnRef(COLUMN_REF_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case DatamartDSLPackage.DATAMART_COLUMN__COLUMN_REF: |
| return columnRef != COLUMN_REF_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (columnRef: "); |
| result.append(columnRef); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //DatamartColumnImpl |