org.eclipse.emf.facet.efacet.core.query
Interface IDerivedTypedElementCollectionImplementation

All Superinterfaces:
IDerivedTypedElementImplementation

Deprecated. replaced by IQueryCollectionImplementation. https://bugs.eclipse.org/bugs/show_bug.cgi?id=377057.

@Deprecated
public interface IDerivedTypedElementCollectionImplementation
extends IDerivedTypedElementImplementation

This interface can be implemented by EMF Facet derived typed element implementations that want to handle multiple evaluation themselves, presumably to improve the performance of the evaluation.

If only IDerivedTypedElementImplementation is implemented, then the framework will perform multiple-evaluation by calling the single evaluation multiple times, which may be slow in the case of high-latency implementations.

Since:
0.2

Method Summary
 java.util.List<? extends ETypedElementResult> getValues(DerivedTypedElement derivedTypedElement, java.util.Collection<? extends EObject> sources, java.util.List<ParameterValue> arguments)
          Deprecated. This method must be implemented by each sub-class to evaluate the query of a derived typed element on a collection of elements.
 void setValues(DerivedTypedElement derivedTypedElement, java.util.Collection<? extends EObject> sources, java.util.List<ParameterValue> arguments, java.util.List<? extends java.lang.Object> newValues)
          Deprecated. This method must be implemented by each sub-class to set the values of a collection of elements.
 
Methods inherited from interface org.eclipse.emf.facet.efacet.core.query.IDerivedTypedElementImplementation
getCheckResultType, getValue, setValue
 

Method Detail

getValues

java.util.List<? extends ETypedElementResult> getValues(DerivedTypedElement derivedTypedElement,
                                                        java.util.Collection<? extends EObject> sources,
                                                        java.util.List<ParameterValue> arguments)
                                                        throws DerivedTypedElementException
Deprecated. 
This method must be implemented by each sub-class to evaluate the query of a derived typed element on a collection of elements. The query should be evaluated on each of the elements in the given collection.

This method should throw a DerivedTypedElementException only if the DerivedTypedElement is incorrect. But it must not throw an exception if the evaluation of one element fails. Instead, it must set the exception on the corresponding result (AbstractDerivedTypedElementResult#setException(Throwable)).

Parameters:
derivedTypedElement - The derived typed element for which to get the values
sources - The model elements on which the derived typed element is evaluated
arguments - The parameter values for the derived typed element (in the case of a FacetOperation); can be null
Returns:
the result :
  • a list of DerivedTypedElementPrimitiveTypeResult if the derived typed element is single-valued and returns a primitive type
  • a list of DerivedTypedElementPrimitiveTypeListResult if the derived typed element is multi-valued and returns a primitive type
  • a list of DerivedTypedElementEObjectResult if the derived typed element is single-valued and returns a model element
  • a list of DerivedTypedElementEObjectListResult if the derived typed element is multi-valued and returns model elements
Throws:
DerivedTypedElementException - if the given derivedTypedElement is incorrect

setValues

void setValues(DerivedTypedElement derivedTypedElement,
               java.util.Collection<? extends EObject> sources,
               java.util.List<ParameterValue> arguments,
               java.util.List<? extends java.lang.Object> newValues)
               throws DerivedTypedElementException
Deprecated. 
This method must be implemented by each sub-class to set the values of a collection of elements. The derived typed element's query should be used to set the value of each of the elements in the given collection.

Parameters:
query - The query to evaluate
source - The model elements on which the query is evaluated
arguments - The parameter values for the derived typed element (in the case of a FacetOperation); can be null
newValues - the new values for the sources; the size of this list must match the size of the list of sources
Throws:
DerivedTypedElementException - if the given derivedTypedElement is incorrect
DerivedTypedElementEvaluationException - if the query of the derived typed element could not be evaluated correctly
java.lang.IllegalArgumentException - if the given list of values does not match the list of sources