PagingAndSortingRepository
Interface
Learn about the PagingAndSortingRepository
interface supported by the Spring Data Framework.
The NosqlRepository
interface extends the PagingAndSortingRepository
interface.
The PagingAndSortingRepository
interface extends the CrudRepository
interface and provides methods such as:
- Page<T> findAll(Pageable pageable)
- Iterable<T> findAll(Sort sort)
- long count()
- void delete(T entity)
- void deleteAll()
- void deleteAll(Iterable<? extends T> entities)
- void deleteAllById(Iterable<? extends ID> ids)
- void deleteById(ID id)
- boolean existsById(ID id)
- Iterable<T> findAll()
- Iterable<T> findAllById(Iterable<ID> ids)
- Optional<T> findById(ID id)
- <S extends T> S save(S entity)
- <S extends T> Iterable<S> saveAll(Iterable<S> entities)
You can use any of these methods for the required functionality.
For more information about the Spring's PagingAndSortingRepository
interface, see PagingAndSortingRepository.