Package javax.jdo

Examples of javax.jdo.Query.executeWithMap()


        getPartQueryWithParams(dbName, tblName, partNames);
    Query query = queryWithParams.getFirst();
    query.setClass(MPartition.class);
    query.setResult("sd");
    @SuppressWarnings("unchecked")
    List<MStorageDescriptor> sds = (List<MStorageDescriptor>)query.executeWithMap(
        queryWithParams.getSecond());
    HashSet<MColumnDescriptor> candidateCds = new HashSet<MColumnDescriptor>();
    for (MStorageDescriptor sd : sds) {
      if (sd != null && sd.getCD() != null) {
        candidateCds.add(sd.getCD());
View Full Code Here


    query.setResultClass(MPartition.class);
    query.setClass(MPartition.class);
    query.setOrdering("partitionName ascending");

    @SuppressWarnings("unchecked")
    List<MPartition> result = (List<MPartition>)query.executeWithMap(queryWithParams.getSecond());
    return result;
  }

  private ObjectPair<Query, Map<String, String>> getPartQueryWithParams(
      String dbName, String tblName, List<String> partNames) {
View Full Code Here

            " 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

      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

    Map<String, Object> params = new HashMap<String, Object>();
    params.put("userMapId", userMapId);
    params.put("status", WeiboStatus.FAILED);

    @SuppressWarnings("unchecked")
    List<WeiboMap> weiboMapList = (List<WeiboMap>) query.executeWithMap(params);
    for (WeiboMap weiboMap : weiboMapList) {
    if(weiboMap.getSource().equals(source)){
      weiboMap = pm.detachCopy(weiboMap);
      result.add(weiboMap);
    }
View Full Code Here

    if (checkUpdate) {
      filterStr = filterStr.delete(filterStr.length() - optStr.length(), filterStr.length() - 1);

      query.setFilter(filterStr.toString());

      results = (List<T>) query.executeWithMap(paramsMap);
    }

    if (results != null && results.size() > 0) {
      pm.deletePersistent(results.get(0));
      log.info("delete  --> " + entity);
View Full Code Here

    Map<String, Object> params = new HashMap<String, Object>();
    params.put("userMapId", userMapId);
    params.put("status", WeiboStatus.FAILED);

    @SuppressWarnings("unchecked")
    List<CommentMap> CommentMapList = (List<CommentMap>) query.executeWithMap(params);

    pm.detachCopyAll(CommentMapList);

    return CommentMapList;
View Full Code Here

        getPartQueryWithParams(dbName, tblName, partNames);
    Query query = queryWithParams.getFirst();
    query.setClass(MPartition.class);
    query.setResult("sd");
    @SuppressWarnings("unchecked")
    List<MStorageDescriptor> sds = (List<MStorageDescriptor>)query.executeWithMap(
        queryWithParams.getSecond());
    HashSet<MColumnDescriptor> candidateCds = new HashSet<MColumnDescriptor>();
    for (MStorageDescriptor sd : sds) {
      if (sd != null && sd.getCD() != null) {
        candidateCds.add(sd.getCD());
View Full Code Here

    query.setResultClass(MPartition.class);
    query.setClass(MPartition.class);
    query.setOrdering("partitionName ascending");

    @SuppressWarnings("unchecked")
    List<MPartition> result = (List<MPartition>)query.executeWithMap(queryWithParams.getSecond());
    return result;
  }

  private ObjectPair<Query, Map<String, String>> getPartQueryWithParams(
      String dbName, String tblName, List<String> partNames) {
View Full Code Here

            " 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

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.