org.objectweb.speedo.query.lib
Class QueryEvalContext

java.lang.Object
  extended byorg.objectweb.speedo.query.lib.QueryEvalContext

public class QueryEvalContext
extends java.lang.Object

Represent a Medor query executed for a JDO query. It contains the query, the evaluator, a link to the SpeedoCompiledQuery and some information about the data prefetching. A JDO can correspond to several Medor query in case of inheritance for example.

Author:
S.Chassande-Barrioz

Field Summary
 org.objectweb.medor.eval.api.QueryEvaluator evaluator
          the evaluator of the query
 org.objectweb.jorm.api.PClassMapping pcm
          the PClassMapping of the prefetched class
 int pnIndex
          is the index of the identifier (prefetch index too)
 org.objectweb.medor.query.api.QueryTree query
          The medor querytree representing the query
 SpeedoCompiledQuery sqc
          The original speedo compiled query
 
Constructor Summary
QueryEvalContext(org.objectweb.medor.query.api.QueryTree qt, SpeedoCompiledQuery sqc)
           
 
Method Summary
 org.objectweb.medor.tuple.api.TupleCollection eval(ProxyManager pm, org.objectweb.medor.expression.api.ParameterOperand[] pos, java.lang.Object connection, QueryDefinition userqd)
          Executes the sub query
protected  java.lang.String posToString(org.objectweb.medor.expression.api.ParameterOperand[] pos)
          Produces a String representation of parameter for logging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

public org.objectweb.medor.query.api.QueryTree query
The medor querytree representing the query


evaluator

public org.objectweb.medor.eval.api.QueryEvaluator evaluator
the evaluator of the query


pnIndex

public int pnIndex
is the index of the identifier (prefetch index too)


pcm

public org.objectweb.jorm.api.PClassMapping pcm
the PClassMapping of the prefetched class


sqc

public SpeedoCompiledQuery sqc
The original speedo compiled query

Constructor Detail

QueryEvalContext

public QueryEvalContext(org.objectweb.medor.query.api.QueryTree qt,
                        SpeedoCompiledQuery sqc)
Parameters:
qt - is the medor querytree representing the query
sqc - is the original speedo compiled query
Method Detail

eval

public org.objectweb.medor.tuple.api.TupleCollection eval(ProxyManager pm,
                                                          org.objectweb.medor.expression.api.ParameterOperand[] pos,
                                                          java.lang.Object connection,
                                                          QueryDefinition userqd)
                                                   throws org.objectweb.medor.api.MedorException
Executes the sub query

Parameters:
pm - is the current persistence manager
pos - is the parameter of the query
connection - is the way to reach the persistence support
Returns:
a TupleCollection containing the result
Throws:
org.objectweb.medor.api.MedorException

posToString

protected java.lang.String posToString(org.objectweb.medor.expression.api.ParameterOperand[] pos)
Produces a String representation of parameter for logging.