Interface PagingAndSortingRepository<T,ID>

All Superinterfaces:
Repository<T,ID>
All Known Subinterfaces:
ListPagingAndSortingRepository<T,ID>

@NoRepositoryBean public interface PagingAndSortingRepository<T,ID> extends Repository<T,ID>
Repository fragment to provide methods to retrieve entities using the pagination and sorting abstraction. In many cases this will be combined with CrudRepository or similar or with manually added methods to provide CRUD functionality.
Author:
Oliver Gierke, Jens Schauder
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    findAll(Pageable pageable)
    Returns a Page of entities meeting the paging restriction provided in the Pageable object.
    findAll(Sort sort)
    Returns all entities sorted by the given options.
  • Method Details

    • findAll

      Iterable<T> findAll(Sort sort)
      Returns all entities sorted by the given options.
      Parameters:
      sort - the Sort specification to sort the results by, can be Sort.unsorted(), must not be null.
      Returns:
      all entities sorted by the given options
    • findAll

      Page<T> findAll(Pageable pageable)
      Returns a Page of entities meeting the paging restriction provided in the Pageable object.
      Parameters:
      pageable - the pageable to request a paged result, can be Pageable.unpaged(), must not be null.
      Returns:
      a page of entities