org.objectweb.medor.eval.lib
Class DeleteEvaluator

java.lang.Object
  extended byorg.objectweb.medor.eval.lib.AbstractQueryEvaluator
      extended byorg.objectweb.medor.eval.lib.DeleteEvaluator
All Implemented Interfaces:
QueryEvaluator
Direct Known Subclasses:
UpdateEvaluator

public class DeleteEvaluator
extends AbstractQueryEvaluator


Field Summary
 
Fields inherited from class org.objectweb.medor.eval.lib.AbstractQueryEvaluator
query, wrapperFactory
 
Constructor Summary
DeleteEvaluator(QueryTree query)
           
 
Method Summary
 TupleCollection evaluate(ParameterOperand[] parameters, ConnectionResources resources, java.util.Map evalMDMap)
          Evaluates each QueryLeaf for deleting data.
 TupleCollection evaluate(ParameterOperand[] parameters, ConnectionResources resources, PrefetchBuffer pb, java.util.Map evalMDMap)
          Launch the evaluation of a query.
 long getCacheSize()
           
protected  java.util.List getQueryLeaves()
           
 ConnectionResources getRequiredConnectionResources()
           
protected  long perfom(Wrapper w, QueryLeaf ql, ParameterOperand[] parameters, java.lang.Object conn, EvaluationMetaData emd)
           
 
Methods inherited from class org.objectweb.medor.eval.lib.AbstractQueryEvaluator
getMemoryTupleCollection, getQueryTree, getWrapperFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteEvaluator

public DeleteEvaluator(QueryTree query)
                throws EvaluationException
Method Detail

getRequiredConnectionResources

public ConnectionResources getRequiredConnectionResources()

getQueryLeaves

protected java.util.List getQueryLeaves()
                                 throws EvaluationException
Throws:
EvaluationException

getCacheSize

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

evaluate

public TupleCollection evaluate(ParameterOperand[] parameters,
                                ConnectionResources resources,
                                PrefetchBuffer pb,
                                java.util.Map evalMDMap)
                         throws EvaluationException
Description copied from interface: QueryEvaluator
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).
resources - 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

evaluate

public TupleCollection evaluate(ParameterOperand[] parameters,
                                ConnectionResources resources,
                                java.util.Map evalMDMap)
                         throws EvaluationException
Evaluates each QueryLeaf for deleting data.

Parameters:
parameters - is the array of query parameter (never null).
resources - 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.
Returns:
a TupleCollection containg an unique Tuple with an unique field corresponding to the amout of delete data from all query leaves.
Throws:
EvaluationException

perfom

protected long perfom(Wrapper w,
                      QueryLeaf ql,
                      ParameterOperand[] parameters,
                      java.lang.Object conn,
                      EvaluationMetaData emd)
               throws MedorException
Throws:
MedorException