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, java.util.Map evalMDMap)
          Launch the evaluation of a query.
 TupleCollection evaluate(ParameterOperand[] parameters, ConnectionResources ressources, PrefetchBuffer pb, java.util.Map evalMDMap)
          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,
                                java.util.Map evalMDMap)
                         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.
evalMDMap - contains a map associating an EvaluationMetaData object to each of the query nodes of the query tree currently associated to the QueryEvaluator.
Throws:
EvaluationException

evaluate

public TupleCollection evaluate(ParameterOperand[] parameters,
                                ConnectionResources ressources,
                                PrefetchBuffer pb,
                                java.util.Map evalMDMap)
                         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.
Throws:
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 associated to the current QueryEvaluator.

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