Package com.googlecode.objectify

Examples of com.googlecode.objectify.Objectify.query()


        }
       
        NamespaceManager.set(namespace);
       
        // __Stat_Ns_Kind__ query
        nsKindsMap.put(namespace, ofy.query(NSKind.class).fetch());
       
        // __Stat_Ns_Kind_IsRootEntity__ query
        nsRootKindsMap.put(namespace, ofy.query(NSKindIsRootEntity.class).fetch());
       
        // __Stat_Ns_Kind_NotRootEntity__ query
View Full Code Here


       
        // __Stat_Ns_Kind__ query
        nsKindsMap.put(namespace, ofy.query(NSKind.class).fetch());
       
        // __Stat_Ns_Kind_IsRootEntity__ query
        nsRootKindsMap.put(namespace, ofy.query(NSKindIsRootEntity.class).fetch());
       
        // __Stat_Ns_Kind_NotRootEntity__ query
        nsNonRootKindsMap.put(namespace, ofy.query(NSKindNonRootEntity.class).fetch());
       
        // __Stat_Ns_PropertyType_PropertyName_Kind__ query
View Full Code Here

       
        // __Stat_Ns_Kind_IsRootEntity__ query
        nsRootKindsMap.put(namespace, ofy.query(NSKindIsRootEntity.class).fetch());
       
        // __Stat_Ns_Kind_NotRootEntity__ query
        nsNonRootKindsMap.put(namespace, ofy.query(NSKindNonRootEntity.class).fetch());
       
        // __Stat_Ns_PropertyType_PropertyName_Kind__ query
        nsPropertyTypeNameKindsMap.put(namespace, ofy.query(NSPropertyTypePropertyNameKind.class).fetch());
      }
      NamespaceManager.set(null)// reset namespace
View Full Code Here

       
        // __Stat_Ns_Kind_NotRootEntity__ query
        nsNonRootKindsMap.put(namespace, ofy.query(NSKindNonRootEntity.class).fetch());
       
        // __Stat_Ns_PropertyType_PropertyName_Kind__ query
        nsPropertyTypeNameKindsMap.put(namespace, ofy.query(NSPropertyTypePropertyNameKind.class).fetch());
      }
      NamespaceManager.set(null)// reset namespace
     
      // ====================== step 2, assemble results=====================
      Total total = DatastoreUtil.singleEntityFrom(totals);
View Full Code Here

            resp.sendError(400, "entityClass could not be found");
            return;
        }

        Objectify objectify = ObjectifyService.begin();
        Query query = objectify.query(clazz).filter("dumpVersion", dumpVersion);
        if (bookmark != null) {
            logger.info("Proceeding query from bookmark: {}", bookmark);
            query.startCursor(Cursor.fromWebSafeString(bookmark));
        }
View Full Code Here

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        Objectify objectify = ObjectifyService.begin();
        Query<InvBlueprintType> query = objectify.query(InvBlueprintType.class).filter("dumpVersion", getDumpVersion());
        String bookmark = req.getParameter("bookmark");
        if (bookmark != null) {
            logger.info("Proceeding query from bookmark: {}", bookmark);
            query.startCursor(Cursor.fromWebSafeString(bookmark));
        }
View Full Code Here

            resp.sendError(400, "dumpVersion must be present");
            return;
        }

        Objectify objectify = ObjectifyService.begin();
        Query<InvType> query = objectify.query(InvType.class).filter("dumpVersion", dumpVersion);
        if (bookmark != null) {
            logger.info("Proceeding query from bookmark: {}", bookmark);
            query.startCursor(Cursor.fromWebSafeString(bookmark));
        }
View Full Code Here

   
    Student student = AuthController.getCurrentStudent();
   
    Objectify ofy = Registry.dao().ofy();
    resp.getWriter().println("Cleaning activities...");
    QueryResultIterable<Key<Activity>> activities = ofy.query(Activity.class).filter("student =", student).fetchKeys();
    ofy.delete(activities);
    resp.getWriter().println("Cleaning activity slices...");
    QueryResultIterable<Key<ActivitySlice>> slices = ofy.query(ActivitySlice.class).filter("student =", student).fetchKeys();
    ofy.delete(slices);
    resp.getWriter().println("Done.");
View Full Code Here

    Objectify ofy = Registry.dao().ofy();
    resp.getWriter().println("Cleaning activities...");
    QueryResultIterable<Key<Activity>> activities = ofy.query(Activity.class).filter("student =", student).fetchKeys();
    ofy.delete(activities);
    resp.getWriter().println("Cleaning activity slices...");
    QueryResultIterable<Key<ActivitySlice>> slices = ofy.query(ActivitySlice.class).filter("student =", student).fetchKeys();
    ofy.delete(slices);
    resp.getWriter().println("Done.");
  }
}
View Full Code Here

   
    @Override
    public Solution get(String name)
    {
        Objectify ofy = ObjectifyService.begin();
        Query<Solution> q = ofy.query(Solution.class).filter("name", name);
       
        return q.get();
    }
   
    @Override
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.