/** * Converts this cursor to an array. * * @return an array of elements * @throws MongoException If an error occurred */ public List<T> toArray() throws MongoException { executed(); return toArray(Integer.MAX_VALUE); }
/** * Converts this cursor to an array. * * @return an array of elements * @throws MongoException If an error occurred */ public List<T> toArray() throws MongoException { executed(); return toArray(Integer.MAX_VALUE); }
@Path("bars") @GET @Produces(MediaType.APPLICATION_JSON) public List<Bar> listBars() { return getJacksonDBCollection().find().toArray(); }