/** * Gets all documents in the collection for the class type of this repository, with pagination * * @param pageable * the pageable object to use for pagination of the results * @return an iterable with all the documents in the collection */ @Override public Page<T> findAll(final Pageable pageable) { if (pageable == null) { LOGGER.debug("Pageable in findAll(Pageable) is null"); } final ArangoCursor<T> result = findAllInternal(pageable, null, new HashMap<>()); final List<T> content = result.asListRemaining(); return new PageImpl<>(content, pageable, result.getStats().getFullCount()); }
/** * Gets all documents in the collection for the class type of this repository, with pagination * * @param pageable * the pageable object to use for pagination of the results * @return an iterable with all the documents in the collection */ @Override public Page<T> findAll(final Pageable pageable) { if (pageable == null) { LOGGER.debug("Pageable in findAll(Pageable) is null"); } final ArangoCursor<T> result = findAllInternal(pageable, null, new HashMap<>()); final List<T> content = result.asListRemaining(); return new PageImpl<>(content, pageable, result.getStats().getFullCount()); }
/** * Finds all documents which match with the given example, with pagination * * @param example * example object to construct query with * @param pageable * pageable object to apply pagination with * @param <S> * @return iterable of all matching documents, with pagination */ @Override public <S extends T> Page<S> findAll(final Example<S> example, final Pageable pageable) { final ArangoCursor cursor = findAllInternal(pageable, example, new HashMap()); final List<T> content = cursor.asListRemaining(); return new PageImpl<>((List<S>) content, pageable, cursor.getStats().getFullCount()); }
/** * Finds all documents which match with the given example, with pagination * * @param example * example object to construct query with * @param pageable * pageable object to apply pagination with * @param <S> * @return iterable of all matching documents, with pagination */ @Override public <S extends T> Page<S> findAll(final Example<S> example, final Pageable pageable) { final ArangoCursor cursor = findAllInternal(pageable, example, new HashMap()); final List<T> content = cursor.asListRemaining(); return new PageImpl<>((List<S>) content, pageable, cursor.getStats().getFullCount()); }