org.objectweb.medor.eval.api
Interface QueryEvaluator

All Known Implementing Classes:
MedorEvaluator

public interface QueryEvaluator

This interface represents the MEDOR evaluator. It permits to evaluate an evaluable (optimized) query Tree.


Method Summary
 TupleCollection evaluate(ParameterOperand[] parameters, ConnectionResources ressources)
          Launch the evaluation of a query.
 TupleCollection evaluate(ParameterOperand[] parameters, ConnectionResources ressources, PrefetchBuffer pb)
          Launch the evaluation of a query.
 long getCacheSize()
           
 QueryTree getQueryTree()
           
 ConnectionResources getRequiredConnectionResources()
           
 WrapperFactory getWrapperFactory()
          Returns the associated WrapperFactory.
 

Method Detail

evaluate

public TupleCollection evaluate(ParameterOperand[] parameters,
                                ConnectionResources ressources)
                         throws EvaluationException
Launch the evaluation of a query.

Parameters:
parameters - is the array of query parameter (Never null).
ressources - is a ConnectionResources containing associations between the DataStore names used in the QueryTree and the connection objects to use for the evaluation.It can be null.
EvaluationException

evaluate

public TupleCollection evaluate(ParameterOperand[] parameters,
                                ConnectionResources ressources,
                                PrefetchBuffer pb)
                         throws EvaluationException
Launch the evaluation of a query. This method is able to prefetch data of the query in a prefetch buffer.

Parameters:
parameters - is the array of query parameter (Never null).
ressources - is a ConnectionResources containing associations between the DataStore names used in the QueryTree and the connection objects to use for the evaluation.It can be null.
pb - is the prefetch buffer which must be fill with query results. If this parameter is null then no data prefetching is done.
EvaluationException

getRequiredConnectionResources

public ConnectionResources getRequiredConnectionResources()

getCacheSize

public long getCacheSize()
Returns:
the cache size used in different node of the QueryNode tree.

getQueryTree

public QueryTree getQueryTree()
Returns:
the evaluable (optimized) query tree.

getWrapperFactory

public WrapperFactory getWrapperFactory()
Returns the associated WrapperFactory. This is used to be able to bind specific Wrappers to DataStore types.

Returns:
the associated WrapperFactory