Package org.objectweb.medor.eval.api

Examples of org.objectweb.medor.eval.api.ConnectionResources


    protected Object executeQT(JDOPOManagerItf pm, ParameterOperand[] pos, QueryDefinition userqd)
        throws EvaluationException, MedorException, SpeedoException {
        flushCache(pm);
        Object connection = ((TransactionItf) pm.currentTransaction())
                .getConnectionHolder();
        ConnectionResources connRess =
            evaluator.getRequiredConnectionResources();

        // 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);
        }

        TupleCollection queryResult = null;
        try {
            queryResult = evaluator.evaluate(pos, connRess, null);
View Full Code Here


  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()));
View Full Code Here

TOP

Related Classes of org.objectweb.medor.eval.api.ConnectionResources

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.