The PagingAndSortingRepository interface

The PagingAndSortingRepository defines methods that provide the functionality to divide the ResultSet into pages as well as sort the results:

   public interface PagingAndSortingRepository<T, ID extends
Serializable>
extends CrudRepository<T, ID> {
Iterable<T> findAll(Sort sort);
Page<T> findAll(Pageable pageable);
}

We will look at examples of using the Sort class and Page, Pageable interfaces in the section on Spring Data JPA.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset