/** | |
* Copyright (c) 2011, 2012 Mia-Software. | |
* | |
* 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 | |
* | |
* Contributors: | |
* Gregoire Dupe (Mia-Software) - Design | |
* Nicolas Guyomar (Mia-Software) - Implementation | |
* Emmanuelle Rouillé (Mia-Software) - Bug 352618 - To be able to use non derived facet structural features and save them values. | |
* Nicolas Bros (Mia-Software) - Bug 361823 - [Restructuring] eFacet2 meta-model | |
* Gregoire Dupe (Mia-Software) - Bug 366055 - NavigationQuery | |
* Gregoire Dupe (Mia-Software) - Bug 369673 - [Facet] IsOneOfQuery | |
* Olivier Remaud (Soft-Maint) - Bug 369824 - Add a simple way to return string literal constants from a customization query | |
* Gregoire Dupe (Mia-software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework | |
* Gregoire Dupe (Mia-software) - Bug 364325 - [Restructuring] The user must be able to navigate into a model using the Facet. | |
*/ | |
package org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.impl; | |
import java.util.Collection; | |
import org.eclipse.emf.common.util.EList; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.EObject; | |
import org.eclipse.emf.ecore.util.EObjectResolvingEList; | |
import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.ETypedElementEObjectListResult; | |
import org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.RuntimePackage; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>ETyped Element EObject List Result</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.impl.ETypedElementEObjectListResultImpl#getResultList <em>Result List</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class ETypedElementEObjectListResultImpl<T extends EObject> extends ETypedElementResultImpl implements ETypedElementEObjectListResult<T> { | |
/** | |
* The cached value of the '{@link #getResultList() <em>Result List</em>}' reference list. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getResultList() | |
* @generated | |
* @ordered | |
*/ | |
protected EList<T> resultList; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected ETypedElementEObjectListResultImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return RuntimePackage.Literals.ETYPED_ELEMENT_EOBJECT_LIST_RESULT; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public EList<T> getResultList() { | |
if (resultList == null) { | |
resultList = new EObjectResolvingEList<T>(EObject.class, this, RuntimePackage.ETYPED_ELEMENT_EOBJECT_LIST_RESULT__RESULT_LIST); | |
} | |
return resultList; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case RuntimePackage.ETYPED_ELEMENT_EOBJECT_LIST_RESULT__RESULT_LIST: | |
return getResultList(); | |
} | |
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 RuntimePackage.ETYPED_ELEMENT_EOBJECT_LIST_RESULT__RESULT_LIST: | |
getResultList().clear(); | |
getResultList().addAll((Collection<? extends T>)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case RuntimePackage.ETYPED_ELEMENT_EOBJECT_LIST_RESULT__RESULT_LIST: | |
getResultList().clear(); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case RuntimePackage.ETYPED_ELEMENT_EOBJECT_LIST_RESULT__RESULT_LIST: | |
return resultList != null && !resultList.isEmpty(); | |
} | |
return super.eIsSet(featureID); | |
} | |
} //ETypedElementEObjectListResultImpl |