blob: 6173ba3eea1abe6d4bc60b214d32e9e0380c5c28 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2019 Xored Software Inc and others.
* 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
* https://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.rcptt.ecl.data.commands.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.rcptt.ecl.core.EclList;
import org.eclipse.rcptt.ecl.core.impl.CommandImpl;
import org.eclipse.rcptt.ecl.data.commands.CommandsPackage;
import org.eclipse.rcptt.ecl.data.commands.ListAsTableData;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>List As Table Data</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.rcptt.ecl.data.commands.impl.ListAsTableDataImpl#getList <em>List</em>}</li>
* </ul>
*
* @generated
*/
public class ListAsTableDataImpl extends CommandImpl implements ListAsTableData {
/**
* The cached value of the '{@link #getList() <em>List</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getList()
* @generated
* @ordered
*/
protected EclList list;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ListAsTableDataImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return CommandsPackage.Literals.LIST_AS_TABLE_DATA;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EclList getList() {
if (list != null && list.eIsProxy()) {
InternalEObject oldList = (InternalEObject)list;
list = (EclList)eResolveProxy(oldList);
if (list != oldList) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, CommandsPackage.LIST_AS_TABLE_DATA__LIST, oldList, list));
}
}
return list;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EclList basicGetList() {
return list;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setList(EclList newList) {
EclList oldList = list;
list = newList;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, CommandsPackage.LIST_AS_TABLE_DATA__LIST, oldList, list));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CommandsPackage.LIST_AS_TABLE_DATA__LIST:
if (resolve) return getList();
return basicGetList();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CommandsPackage.LIST_AS_TABLE_DATA__LIST:
setList((EclList)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CommandsPackage.LIST_AS_TABLE_DATA__LIST:
setList((EclList)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CommandsPackage.LIST_AS_TABLE_DATA__LIST:
return list != null;
}
return super.eIsSet(featureID);
}
} //ListAsTableDataImpl