From 02d780fdf36a8e5989f1184187de91a8ce2c69c8 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Thu, 19 Oct 2023 16:07:03 +0200 Subject: [PATCH] Mention `ListPagingAndSortingRepository` in documentation. Closes #2960 Original pull request: #2961 --- .../antora/modules/ROOT/pages/repositories/core-concepts.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/repositories/core-concepts.adoc b/src/main/antora/modules/ROOT/pages/repositories/core-concepts.adoc index ac405cac1..6fbc07f78 100644 --- a/src/main/antora/modules/ROOT/pages/repositories/core-concepts.adoc +++ b/src/main/antora/modules/ROOT/pages/repositories/core-concepts.adoc @@ -40,7 +40,7 @@ The methods declared in this interface are commonly referred to as CRUD methods. NOTE: We also provide persistence technology-specific abstractions, such as `JpaRepository` or `MongoRepository`. Those interfaces extend `CrudRepository` and expose the capabilities of the underlying persistence technology in addition to the rather generic persistence technology-agnostic interfaces such as `CrudRepository`. -Additional to the `CrudRepository`, there is a {spring-data-commons-javadoc-base}/org/springframework/data/repository/PagingAndSortingRepository.html[`PagingAndSortingRepository`] abstraction that adds additional methods to ease paginated access to entities: +Additional to the `CrudRepository`, there are {spring-data-commons-javadoc-base}/org/springframework/data/repository/PagingAndSortingRepository.html[`PagingAndSortingRepository`] and {spring-data-commons-javadoc-base}/org/springframework/data/repository/ListPagingAndSortingRepository.html[`ListPagingAndSortingRepository`] which adds additional methods to ease paginated access to entities: .`PagingAndSortingRepository` interface [source,java] @@ -61,6 +61,8 @@ PagingAndSortingRepository repository = // … get access to a bean Page users = repository.findAll(PageRequest.of(1, 20)); ---- +`ListPagingAndSortingRepository` offers equivalent methods, but returns a `List` where the `PagingAndSortingRepository` methods return an `Iterable`. + ifdef::feature-scroll[] In addition to pagination, scrolling provides a more fine-grained access to iterate through chunks of larger result sets. endif::[]