Package javax.jdo

Examples of javax.jdo.Query.addExtension()


        int index = 0;
        Query query = getPM().newQuery(singleStringQuery);
        Map extentions = new HashMap();
        extentions.put("unknown key 1", "unknown value 1");
        query.setExtensions(extentions);
        query.addExtension("unknown key 2", "unknown value 2");
        executeJDOQuery(ASSERTION_FAILED, query, singleStringQuery,
                false, null, expectedResult[index], true);
    }
   
    /**
 
View Full Code Here


          parentlist.add(k.getParent());
        }
        // fetch the parents using the keys
        Query q2 = pm.newQuery("select from " + FeedInfo.class.getName() + " where urlstring == :keys");
        // setting query deadline, allowing eventual consistency on read
        q2.addExtension("datanucleus.appengine.datastoreReadConsistency", "EVENTUAL");
        // we could also set timeout if we wanted a short-latency query. (We would then
        // have to handle the query timeout properly).
        // q.setTimeoutMillis(10000);
        @SuppressWarnings("unchecked")
        List<FeedInfo> results = (List<FeedInfo>) q2.execute(parentlist);
View Full Code Here

      Query q = pm.newQuery("select id from " + StreamItem.class.getName() + qstring);
      q.setOrdering("date desc");
      if (prior) {
        q.setRange(0, range);
      }
      q.addExtension("datanucleus.appengine.datastoreReadConsistency", "EVENTUAL");
      List<String> entryids;
      if (sdate != null) {
        entryids = (List<String>) q.execute(sdate, userid);
      }
      else {
View Full Code Here

          }}
      } // end for
      if (fetchlist.size() > 0) {
        // now fetch the streamitem ids which weren't in the cache, using their list of ids.
        Query q2 = pm.newQuery("select from " + StreamItem.class.getName() + " where id == :keys");
        q2.addExtension("datanucleus.appengine.datastoreReadConsistency", "EVENTUAL");
        List<StreamItem> entries2 = (List<StreamItem>) q2.execute(fetchlist);

        // add the fetched entries to the cache, and to the previous list of items fetched
        // from the cache.
        for (StreamItem e2 : entries2) {
View Full Code Here

        dq = pm.newQuery("select id from " + StreamItem.class.getName() + qstring);
        dq.setOrdering("date desc");
        if (prior) {
          dq.setRange(0, range);
        }
        dq.addExtension("datanucleus.appengine.datastoreReadConsistency", "EVENTUAL");

        List<String> entryids;
        if (sdate != null) {
          entryids = (List<String>) dq.execute(sdate, fsublist);
        }
View Full Code Here

        {
            for (int i=0;i<extmds.length;i++)
            {
                if (extmds[i].getVendorName().equals(MetaData.VENDOR_NAME))
                {
                    query.addExtension(extmds[i].getKey(), extmds[i].getValue());
                }
            }
        }
        if (qmd.isUnmodifiable())
        {
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.