public TupleCollection eval(JDOPOManagerItf pm,
ParameterOperand[] pos,
Object connection,
QueryDefinition userqd) throws MedorException {
// Calculates and gets the required connection ressources for this query
ConnectionResources connRess =
evaluator.getRequiredConnectionResources();
Map evalMDMap = null;
if (userqd != null && (userqd.getIndexFirst() > 0
|| userqd.getIndexLast() < Integer.MAX_VALUE)) {
//range values specified
evalMDMap = new HashMap();
}
// Gets the QueryLeafs that require connections
QueryLeaf[] leafs = connRess.getRequiredQueryLeafConnection();
// Setting QueryLeaf's appropriated connection Object
for (int cpt = 0; (cpt < leafs.length); cpt++) {
connRess.setConnection(leafs[cpt], connection);
if (evalMDMap != null) {
//range values specified
BasicEvaluationMetaData evalMD = new BasicEvaluationMetaData();
evalMD.setLimitedRangeStartAt((int) userqd.getIndexFirst());
evalMD.setLimitedRangeSize((int) (userqd.getIndexLast() - userqd.getIndexFirst()));