| /** |
| * 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{ |
| * Christophe Loetz (Loetz GmbH&Co.KG) - 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.dsl.semantic.entity.LEntityReference; |
| |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartDefinition; |
| |
| import org.eclipse.osbp.xtext.table.TableBrokerDatamart; |
| import org.eclipse.osbp.xtext.table.TableDSLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Table Broker Datamart</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.table.impl.TableBrokerDatamartImpl#getDatamartDef <em>Datamart Def</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.table.impl.TableBrokerDatamartImpl#getFilter <em>Filter</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.table.impl.TableBrokerDatamartImpl#getReference <em>Reference</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class TableBrokerDatamartImpl extends TableLazyResolverImpl implements TableBrokerDatamart { |
| /** |
| * The cached value of the '{@link #getDatamartDef() <em>Datamart Def</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDatamartDef() |
| * @generated |
| * @ordered |
| */ |
| protected DatamartDefinition datamartDef; |
| |
| /** |
| * The default value of the '{@link #getFilter() <em>Filter</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFilter() |
| * @generated |
| * @ordered |
| */ |
| protected static final String FILTER_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getFilter() <em>Filter</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFilter() |
| * @generated |
| * @ordered |
| */ |
| protected String filter = FILTER_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getReference() <em>Reference</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getReference() |
| * @generated |
| * @ordered |
| */ |
| protected LEntityReference reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected TableBrokerDatamartImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return TableDSLPackage.Literals.TABLE_BROKER_DATAMART; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DatamartDefinition getDatamartDef() { |
| if (datamartDef != null && datamartDef.eIsProxy()) { |
| InternalEObject oldDatamartDef = (InternalEObject)datamartDef; |
| datamartDef = (DatamartDefinition)eResolveProxy(oldDatamartDef); |
| if (datamartDef != oldDatamartDef) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TableDSLPackage.TABLE_BROKER_DATAMART__DATAMART_DEF, oldDatamartDef, datamartDef)); |
| } |
| } |
| return datamartDef; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DatamartDefinition basicGetDatamartDef() { |
| return datamartDef; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDatamartDef(DatamartDefinition newDatamartDef) { |
| DatamartDefinition oldDatamartDef = datamartDef; |
| datamartDef = newDatamartDef; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TableDSLPackage.TABLE_BROKER_DATAMART__DATAMART_DEF, oldDatamartDef, datamartDef)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getFilter() { |
| return filter; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFilter(String newFilter) { |
| String oldFilter = filter; |
| filter = newFilter; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TableDSLPackage.TABLE_BROKER_DATAMART__FILTER, oldFilter, filter)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public LEntityReference getReference() { |
| if (reference != null && reference.eIsProxy()) { |
| InternalEObject oldReference = (InternalEObject)reference; |
| reference = (LEntityReference)eResolveProxy(oldReference); |
| if (reference != oldReference) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TableDSLPackage.TABLE_BROKER_DATAMART__REFERENCE, oldReference, reference)); |
| } |
| } |
| return reference; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public LEntityReference basicGetReference() { |
| return reference; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setReference(LEntityReference newReference) { |
| LEntityReference oldReference = reference; |
| reference = newReference; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TableDSLPackage.TABLE_BROKER_DATAMART__REFERENCE, oldReference, reference)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_BROKER_DATAMART__DATAMART_DEF: |
| if (resolve) return getDatamartDef(); |
| return basicGetDatamartDef(); |
| case TableDSLPackage.TABLE_BROKER_DATAMART__FILTER: |
| return getFilter(); |
| case TableDSLPackage.TABLE_BROKER_DATAMART__REFERENCE: |
| if (resolve) return getReference(); |
| return basicGetReference(); |
| } |
| 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_BROKER_DATAMART__DATAMART_DEF: |
| setDatamartDef((DatamartDefinition)newValue); |
| return; |
| case TableDSLPackage.TABLE_BROKER_DATAMART__FILTER: |
| setFilter((String)newValue); |
| return; |
| case TableDSLPackage.TABLE_BROKER_DATAMART__REFERENCE: |
| setReference((LEntityReference)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_BROKER_DATAMART__DATAMART_DEF: |
| setDatamartDef((DatamartDefinition)null); |
| return; |
| case TableDSLPackage.TABLE_BROKER_DATAMART__FILTER: |
| setFilter(FILTER_EDEFAULT); |
| return; |
| case TableDSLPackage.TABLE_BROKER_DATAMART__REFERENCE: |
| setReference((LEntityReference)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case TableDSLPackage.TABLE_BROKER_DATAMART__DATAMART_DEF: |
| return datamartDef != null; |
| case TableDSLPackage.TABLE_BROKER_DATAMART__FILTER: |
| return FILTER_EDEFAULT == null ? filter != null : !FILTER_EDEFAULT.equals(filter); |
| case TableDSLPackage.TABLE_BROKER_DATAMART__REFERENCE: |
| return reference != null; |
| } |
| 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(" (filter: "); |
| result.append(filter); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //TableBrokerDatamartImpl |