Пример #1
0
 public static Entity getSingleUser(String email) {
   Iterable<Entity> results = Util.listEntities(USER, EMAIL, email);
   List<Entity> entity = new ArrayList<Entity>();
   for (Entity e : results) if (e != null) entity.add(e);
   if (!entity.isEmpty()) {
     return (Entity) entity.remove(0);
   }
   return null;
 }
Пример #2
0
 public static Iterable<Entity> getUser(String email) {
   Iterable<Entity> entities = Util.listEntities(USER, EMAIL, email);
   return entities;
 }
Пример #3
0
 /**
  * get All the items in the list
  *
  * @param kind : item kind
  * @return all the items
  */
 public static Iterable<Entity> getAllUsers() {
   Iterable<Entity> entities = Util.listEntities(USER, null, null);
   return entities;
 }