Package org.jiql.util

Examples of org.jiql.util.JGNameValuePairs


    public static Vector<JGNameValuePairs> list(String table)throws JGException
  {
     DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();


    JGNameValuePairs jn = null;
       Query q = new Query(table);
                ArrayList<Key> keys = new ArrayList<Key>();
        PreparedQuery pq = datastore.prepare(q) ;
    int ezt = pq.countEntities();

    if (ezt > fLimit)
      throw JGException.get("result_too_large"," Result too LARGE. Try narrowing query by adding more filters: " + ezt);

                Iterator it = (pq.asIterator());
//new ArrayList
        Entity entity = null;
        Vector<JGNameValuePairs> ez = new Vector<JGNameValuePairs>();
        //int ct = 0;
        Throwable ex = null;  
   for (int ct = 0; ct < readTries;ct++)
{
try{       
                while (it.hasNext()) {
                  //ct = ct + 1;
                 //checkThread(ct);

                  entity = (Entity)it.next();
      jn = new JGNameValuePairs(new Hashtable(entity.getProperties()));
      jn.setKeyName(entity.getKey().getName());
      jn.setKeyId(entity.getKey().getId());
      jn.setTableName(table);
      //(entity.getParent() + ":" + entity.getKey().getName() + " ****** list 2 ***** " + entity.getKey().getId());

      ez.add(jn);

    }
View Full Code Here


             entity =    datastore.get(key);
     }catch (com.google.appengine.api.datastore.EntityNotFoundException enf){
       return null;
     }
            if (entity == null)return null;
            JGNameValuePairs jn = new JGNameValuePairs(new Hashtable(entity.getProperties()));
      jn.setKeyName(entity.getKey().getName());
      jn.setKeyId(entity.getKey().getId());
      jn.setTableName(kind);
          return jn;
                
        }
View Full Code Here

         //if (lst == null || !lst.hasNext())
         //  break;


    Entity entity = null;
    JGNameValuePairs jn = null;
    int ctl = 0;
                    Throwable ex = null;  
   for (int ct = 0; ct < readTries;ct++)
{
try{
   
    while (lst.hasNext())
    {
      ctl = ctl + 1;
      checkThread(ctl);
      entity = (Entity)lst.next();
      jn = new JGNameValuePairs(new Hashtable(entity.getProperties()));
      jn.setKeyName(entity.getKey().getName());
      jn.setKeyId(entity.getKey().getId());
      jn.setTableName(table);
      ez.add(jn);

    }
    return ez;
   
View Full Code Here

TOP

Related Classes of org.jiql.util.JGNameValuePairs

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.