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; }
public static Iterable<Entity> getUser(String email) { Iterable<Entity> entities = Util.listEntities(USER, EMAIL, email); return entities; }
/** * 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; }