Skip to content

Mention ListPagingAndSortingRepository in documentation #2961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>3.2.0-SNAPSHOT</version>
<version>3.2.0-2960-ListPagingAndSortingRepository-documentation-SNAPSHOT</version>

<name>Spring Data Core</name>
<description>Core Spring concepts underpinning every Spring Data module.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -61,6 +61,8 @@ PagingAndSortingRepository<User, Long> repository = // … get access to a bean
Page<User> 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::[]
Expand Down