Interface PagingAndSortingRepository<T,ID>
- Type Parameters:
T- Entity generic typeID- Primary Key generic type
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<T,,ID> org.springframework.data.repository.Repository<T,ID>
public interface PagingAndSortingRepository<T,ID>
extends org.springframework.data.repository.CrudRepository<T,ID>
Version of
PagingAndSortingRepository that inherits from CrudRepository, similar
to the behavior in Spring Boot 2.7.-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<T>findAll(org.springframework.data.domain.Pageable pageable) Returns aPageof entities meeting the paging restriction provided in thePageableobject.findAll(org.springframework.data.domain.Sort sort) Returns all entities sorted by the given options.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findAll
Returns all entities sorted by the given options.- Parameters:
sort- theSortspecification to sort the results by, can beSort.unsorted(), must not be null.- Returns:
- all entities sorted by the given options
-
findAll
Returns aPageof entities meeting the paging restriction provided in thePageableobject.- Parameters:
pageable- the pageable to request a paged result, can bePageable.unpaged(), must not be null.- Returns:
- a page of entities
-