Skip to content

Commit 9866df8

Browse files
committed
Polishing.
Consistent wording for pageable and sort arguments. See #2574
1 parent 95dd775 commit 9866df8

File tree

8 files changed

+21
-12
lines changed

8 files changed

+21
-12
lines changed

src/main/java/org/springframework/data/repository/PagingAndSortingRepository.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@ public interface PagingAndSortingRepository<T, ID> extends CrudRepository<T, ID>
3434
/**
3535
* Returns all entities sorted by the given options.
3636
*
37-
* @param sort
37+
* @param sort the {@link Sort} specification to sort the results by, can be {@link Sort#unsorted()}, must not be
38+
* {@literal null}.
3839
* @return all entities sorted by the given options
3940
*/
4041
Iterable<T> findAll(Sort sort);
4142

4243
/**
43-
* Returns a {@link Page} of entities meeting the paging restriction provided in the {@code Pageable} object.
44+
* Returns a {@link Page} of entities meeting the paging restriction provided in the {@link Pageable} object.
4445
*
45-
* @param pageable must not be {@literal null}.
46+
* @param pageable the pageable to request a paged result, can be {@link Pageable#unpaged()}, must not be
47+
* {@literal null}.
4648
* @return a page of entities
4749
*/
4850
Page<T> findAll(Pageable pageable);

src/main/java/org/springframework/data/repository/history/RevisionRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public interface RevisionRepository<T, ID, N extends Number & Comparable<N>> ext
5555
* implementations have to support sorting by all properties.
5656
*
5757
* @param id must not be {@literal null}.
58-
* @param pageable
58+
* @param pageable the pageable to request a paged result, can be {@link Pageable#unpaged()}, must not be
59+
* {@literal null}.
5960
* @see RevisionSort
6061
* @return
6162
*/

src/main/java/org/springframework/data/repository/query/QueryByExampleExecutor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public interface QueryByExampleExecutor<T> {
5656
* found an empty {@link Iterable} is returned.
5757
*
5858
* @param example must not be {@literal null}.
59-
* @param sort the {@link Sort} specification to sort the results by, must not be {@literal null}.
59+
* @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be
60+
* {@literal null}.
6061
* @return all entities matching the given {@link Example}.
6162
* @since 1.10
6263
*/
@@ -67,7 +68,8 @@ public interface QueryByExampleExecutor<T> {
6768
* {@link Page} is returned.
6869
*
6970
* @param example must not be {@literal null}.
70-
* @param pageable must not be {@literal null}.
71+
* @param pageable the pageable to request a paged result, can be {@link Pageable#unpaged()}, must not be
72+
* {@literal null}.
7173
* @return a {@link Page} of entities matching the given {@link Example}.
7274
*/
7375
<S extends T> Page<S> findAll(Example<S> example, Pageable pageable);

src/main/java/org/springframework/data/repository/query/ReactiveQueryByExampleExecutor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public interface ReactiveQueryByExampleExecutor<T> {
5555
* found {@link Flux#empty()} is returned.
5656
*
5757
* @param example must not be {@literal null}.
58-
* @param sort the {@link Sort} specification to sort the results by, must not be {@literal null}.
58+
* @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be
59+
* {@literal null}.
5960
* @return all entities matching the given {@link Example}.
6061
*/
6162
<S extends T> Flux<S> findAll(Example<S> example, Sort sort);

src/main/java/org/springframework/data/repository/reactive/ReactiveSortingRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public interface ReactiveSortingRepository<T, ID> extends ReactiveCrudRepository
3838
/**
3939
* Returns all entities sorted by the given options.
4040
*
41-
* @param sort must not be {@literal null}.
41+
* @param sort the {@link Sort} specification to sort the results by, can be {@link Sort#unsorted()}, must not be
42+
* {@literal null}.
4243
* @return all entities sorted by the given options.
4344
* @throws IllegalArgumentException in case the given {@link Sort} is {@literal null}.
4445
*/

src/main/java/org/springframework/data/repository/reactive/RxJava2SortingRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public interface RxJava2SortingRepository<T, ID> extends RxJava2CrudRepository<T
3636
/**
3737
* Returns all entities sorted by the given options.
3838
*
39-
* @param sort must not be {@literal null}.
39+
* @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be
40+
* {@literal null}.
4041
* @return all entities sorted by the given options.
4142
*/
4243
Flowable<T> findAll(Sort sort);

src/main/java/org/springframework/data/repository/reactive/RxJava3SortingRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public interface RxJava3SortingRepository<T, ID> extends RxJava3CrudRepository<T
3636
/**
3737
* Returns all entities sorted by the given options.
3838
*
39-
* @param sort must not be {@literal null}.
39+
* @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be
40+
* {@literal null}.
4041
* @return all entities sorted by the given options.
4142
*/
4243
Flowable<T> findAll(Sort sort);

src/main/java/org/springframework/data/repository/support/RepositoryInvoker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public interface RepositoryInvoker extends RepositoryInvocationInformation {
6060
* contained in the given {@link Pageable}) or the plain equivalent to
6161
* {@link org.springframework.data.repository.CrudRepository#findAll()}.
6262
*
63-
* @param pageable can be {@literal null}.
63+
* @param pageable must not be {@literal null}.
6464
* @return the result of the invocation of the find-all method.
6565
* @throws IllegalStateException if the repository does not expose a find-all-method.
6666
*/
@@ -72,7 +72,7 @@ public interface RepositoryInvoker extends RepositoryInvocationInformation {
7272
* {@link org.springframework.data.repository.PagingAndSortingRepository#findAll(Sort)}) or the plain equivalent to
7373
* {@link org.springframework.data.repository.CrudRepository#findAll()}.
7474
*
75-
* @param pageable can be {@literal null}.
75+
* @param sort must not be {@literal null}.
7676
* @return the result of the invocation of the find-all method.
7777
* @throws IllegalStateException if the repository does not expose a find-all-method.
7878
*/

0 commit comments

Comments
 (0)