Examples of executeWithMap()


Examples of javax.jdo.Query.executeWithMap()

      String parameterDeclaration = makeParameterDeclarationString(params);
      query.declareParameters(parameterDeclaration);
      query.setOrdering("partitionName ascending");

      mparts = (List<MPartition>) query.executeWithMap(params);

      LOG.debug("Done executing query for listMPartitionsByFilter");
      pm.retrieveAll(mparts);
      success = commitTransaction();
      LOG.debug("Done retrieving all objects for listMPartitionsByFilter");
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

      String parameterDeclaration = makeParameterDeclarationString(params);
      query.declareParameters(parameterDeclaration);
      query.setOrdering("partitionName ascending");
      query.setResult("partitionName");

      Collection names = (Collection) query.executeWithMap(params);
      partNames = new ArrayList<String>();
      for (Iterator i = names.iterator(); i.hasNext();) {
        partNames.add((String) i.next());
      }
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

      q.setFilter(filter);
      q.declareParameters(params);
      if (order != null && !order.trim().equals(""))
        q.setOrdering(order);

      return (Collection<Object>)q.executeWithMap(parVal);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

    String parameterDeclaration = makeParameterDeclarationString(params);

    query.declareParameters(parameterDeclaration);
    query.setOrdering("partitionName ascending");

    List<MPartition> mparts = (List<MPartition>) query.executeWithMap(params);
    // pm.retrieveAll(mparts); // retrieveAll is pessimistic. some fields may not be needed
    List<Partition> results = convertToParts(dbName, tblName, mparts);
    // pm.makeTransientAll(mparts); // makeTransient will prohibit future access of unfetched fields
    query.closeAll();
    return results;
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

    String parameterDeclaration = makeParameterDeclarationStringObj(params);
    query.declareParameters(parameterDeclaration);
    query.setOrdering("partitionName ascending");

    mparts = (List<MPartition>) query.executeWithMap(params);

    LOG.debug("Done executing query for listMPartitionsByFilterNoTxn");
    pm.retrieveAll(mparts);
    return mparts;
  }
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

            " class: " + entry.getValue().getClass().getName());
      }
      String parameterDeclaration = makeParameterDeclarationStringObj(params);
      query.declareParameters(parameterDeclaration);
      query.setFilter(queryFilterString);
      Collection names = (Collection) query.executeWithMap(params);
      //have to emulate "distinct", otherwise tables with the same name may be returned
      Set<String> tableNamesSet = new HashSet<String>();
      for (Iterator i = names.iterator(); i.hasNext();) {
        tableNamesSet.add((String) i.next());
      }
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

      String parameterDeclaration = makeParameterDeclarationStringObj(params);
      query.declareParameters(parameterDeclaration);
      query.setOrdering("partitionName ascending");
      query.setResult("partitionName");

      Collection names = (Collection) query.executeWithMap(params);
      partNames = new ArrayList<String>();
      for (Iterator i = names.iterator(); i.hasNext();) {
        partNames.add((String) i.next());
      }
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

            query.declareParameters("Integer param");
            query.setFilter("x == param");
       
            Map actualParams = new java.util.HashMap();
            actualParams.put("param", new Integer(2) );
            Object results = query.executeWithMap(actualParams);

            // check query result
            List expected = new ArrayList();
            Object p3 = new PCPoint(2, 2);
            expected.add(p3);
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

            query.setFilter("x == param1 && y == param2");
       
            Map actualParams = new java.util.HashMap();
            actualParams.put("param1", new Integer(2) );
            actualParams.put("param2", new Integer(2) );
            Object results = query.executeWithMap(actualParams);

            // check query result
            List expected = new ArrayList();
            Object p3 = new PCPoint(2, 2);
            expected.add(p3);
View Full Code Here

Examples of javax.jdo.Query.executeWithMap()

       
        if (LOG.isDebugEnabled()) {
            LOG.debug(cls.getName() + " # " + queryName + " ( " + argumentsByParameterName + " )");
        }
       
        final List<?> results = (List<?>) jdoQuery.executeWithMap(argumentsByParameterName);
        if (cardinality == QueryCardinality.MULTIPLE) {
            return results;
        }
        return results.isEmpty()?Collections.emptyList():results.subList(0, 1);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.