diff --git a/src/main/java/org/springframework/data/repository/ListPagingAndSortingRepository.java b/src/main/java/org/springframework/data/repository/ListPagingAndSortingRepository.java index b422f8ebb..16194cb9a 100644 --- a/src/main/java/org/springframework/data/repository/ListPagingAndSortingRepository.java +++ b/src/main/java/org/springframework/data/repository/ListPagingAndSortingRepository.java @@ -38,7 +38,8 @@ public interface ListPagingAndSortingRepository extends PagingAndSortingR /** * Returns all entities sorted by the given options. * - * @param sort + * @param sort the {@link Sort} specification to sort the results by, can be {@link Sort#unsorted()}, must not be + * {@literal null}. * @return all entities sorted by the given options */ List findAll(Sort sort); diff --git a/src/main/java/org/springframework/data/repository/PagingAndSortingRepository.java b/src/main/java/org/springframework/data/repository/PagingAndSortingRepository.java index 3c6eff5af..3423adc43 100644 --- a/src/main/java/org/springframework/data/repository/PagingAndSortingRepository.java +++ b/src/main/java/org/springframework/data/repository/PagingAndSortingRepository.java @@ -37,15 +37,17 @@ public interface PagingAndSortingRepository extends Repository { /** * Returns all entities sorted by the given options. * - * @param sort + * @param sort the {@link Sort} specification to sort the results by, can be {@link Sort#unsorted()}, must not be + * {@literal null}. * @return all entities sorted by the given options */ Iterable findAll(Sort sort); /** - * Returns a {@link Page} of entities meeting the paging restriction provided in the {@code Pageable} object. + * Returns a {@link Page} of entities meeting the paging restriction provided in the {@link Pageable} object. * - * @param pageable must not be {@literal null}. + * @param pageable the pageable to request a paged result, can be {@link Pageable#unpaged()}, must not be + * {@literal null}. * @return a page of entities */ Page findAll(Pageable pageable); diff --git a/src/main/java/org/springframework/data/repository/history/RevisionRepository.java b/src/main/java/org/springframework/data/repository/history/RevisionRepository.java index db277b6b6..03bc0c35d 100755 --- a/src/main/java/org/springframework/data/repository/history/RevisionRepository.java +++ b/src/main/java/org/springframework/data/repository/history/RevisionRepository.java @@ -55,7 +55,8 @@ public interface RevisionRepository> ext * implementations have to support sorting by all properties. * * @param id must not be {@literal null}. - * @param pageable + * @param pageable the pageable to request a paged result, can be {@link Pageable#unpaged()}, must not be + * {@literal null}. * @see RevisionSort * @return */ diff --git a/src/main/java/org/springframework/data/repository/query/FluentQuery.java b/src/main/java/org/springframework/data/repository/query/FluentQuery.java index 21e2ad50f..f9ae7f0fc 100644 --- a/src/main/java/org/springframework/data/repository/query/FluentQuery.java +++ b/src/main/java/org/springframework/data/repository/query/FluentQuery.java @@ -41,7 +41,8 @@ public interface FluentQuery { /** * Define the sort order. * - * @param sort must not be {@code null}. + * @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be + * {@literal null}. * @return a new instance of {@link FluentQuery}. * @throws IllegalArgumentException if resultType is {@code null}. */ @@ -146,8 +147,9 @@ public interface FluentQuery { /** * Get a page of matching elements for {@link Pageable}. * - * @param pageable must not be {@code null}. The given {@link Pageable} will override any previously specified - * {@link Sort sort} if the {@link Sort} object is not {@link Sort#isUnsorted()}. + * @param pageable the pageable to request a paged result, can be {@link Pageable#unpaged()}, must not be + * {@literal null}. The given {@link Pageable} will override any previously specified {@link Sort sort} if + * the {@link Sort} object is not {@link Sort#isUnsorted()}. * @return */ Page page(Pageable pageable); @@ -221,8 +223,9 @@ public interface FluentQuery { /** * Get a page of matching elements for {@link Pageable}. * - * @param pageable must not be {@code null}. The given {@link Pageable} will override any previously specified - * {@link Sort sort} if the {@link Sort} object is not {@link Sort#isUnsorted()}. + * @param pageable the pageable to request a paged result, can be {@link Pageable#unpaged()}, must not be + * {@literal null}. The given {@link Pageable} will override any previously specified {@link Sort sort} if + * the {@link Sort} object is not {@link Sort#isUnsorted()}. * @return */ Mono> page(Pageable pageable); diff --git a/src/main/java/org/springframework/data/repository/query/ListQueryByExampleExecutor.java b/src/main/java/org/springframework/data/repository/query/ListQueryByExampleExecutor.java index d66d30961..aeb2ffbed 100644 --- a/src/main/java/org/springframework/data/repository/query/ListQueryByExampleExecutor.java +++ b/src/main/java/org/springframework/data/repository/query/ListQueryByExampleExecutor.java @@ -46,7 +46,8 @@ public interface ListQueryByExampleExecutor extends QueryByExampleExecutor * found an empty {@link List} is returned. * * @param example must not be {@literal null}. - * @param sort the {@link Sort} specification to sort the results by, must not be {@literal null}. + * @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be + * {@literal null}. * @return all entities matching the given {@link Example}. */ @Override diff --git a/src/main/java/org/springframework/data/repository/query/QueryByExampleExecutor.java b/src/main/java/org/springframework/data/repository/query/QueryByExampleExecutor.java index 664f6e9fd..113820451 100644 --- a/src/main/java/org/springframework/data/repository/query/QueryByExampleExecutor.java +++ b/src/main/java/org/springframework/data/repository/query/QueryByExampleExecutor.java @@ -58,7 +58,8 @@ public interface QueryByExampleExecutor { * found an empty {@link Iterable} is returned. * * @param example must not be {@literal null}. - * @param sort the {@link Sort} specification to sort the results by, must not be {@literal null}. + * @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be + * {@literal null}. * @return all entities matching the given {@link Example}. * @since 1.10 */ @@ -69,7 +70,8 @@ public interface QueryByExampleExecutor { * {@link Page} is returned. * * @param example must not be {@literal null}. - * @param pageable must not be {@literal null}. + * @param pageable the pageable to request a paged result, can be {@link Pageable#unpaged()}, must not be + * {@literal null}. * @return a {@link Page} of entities matching the given {@link Example}. */ Page findAll(Example example, Pageable pageable); diff --git a/src/main/java/org/springframework/data/repository/query/ReactiveQueryByExampleExecutor.java b/src/main/java/org/springframework/data/repository/query/ReactiveQueryByExampleExecutor.java index 3e0154e04..20e066ef8 100644 --- a/src/main/java/org/springframework/data/repository/query/ReactiveQueryByExampleExecutor.java +++ b/src/main/java/org/springframework/data/repository/query/ReactiveQueryByExampleExecutor.java @@ -59,7 +59,8 @@ public interface ReactiveQueryByExampleExecutor { * found {@link Flux#empty()} is returned. * * @param example must not be {@literal null}. - * @param sort the {@link Sort} specification to sort the results by, must not be {@literal null}. + * @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be + * {@literal null}. * @return all entities matching the given {@link Example}. */ Flux findAll(Example example, Sort sort); diff --git a/src/main/java/org/springframework/data/repository/reactive/ReactiveSortingRepository.java b/src/main/java/org/springframework/data/repository/reactive/ReactiveSortingRepository.java index 892185197..255f5ec72 100644 --- a/src/main/java/org/springframework/data/repository/reactive/ReactiveSortingRepository.java +++ b/src/main/java/org/springframework/data/repository/reactive/ReactiveSortingRepository.java @@ -42,7 +42,8 @@ public interface ReactiveSortingRepository extends Repository { /** * Returns all entities sorted by the given options. * - * @param sort must not be {@literal null}. + * @param sort the {@link Sort} specification to sort the results by, can be {@link Sort#unsorted()}, must not be + * {@literal null}. * @return all entities sorted by the given options. * @throws IllegalArgumentException in case the given {@link Sort} is {@literal null}. */ diff --git a/src/main/java/org/springframework/data/repository/reactive/RxJava3SortingRepository.java b/src/main/java/org/springframework/data/repository/reactive/RxJava3SortingRepository.java index 3914fbf72..de6850ab0 100644 --- a/src/main/java/org/springframework/data/repository/reactive/RxJava3SortingRepository.java +++ b/src/main/java/org/springframework/data/repository/reactive/RxJava3SortingRepository.java @@ -38,7 +38,8 @@ public interface RxJava3SortingRepository extends Repository { /** * Returns all entities sorted by the given options. * - * @param sort must not be {@literal null}. + * @param sort the {@link Sort} specification to sort the results by, may be {@link Sort#unsorted()}, must not be + * {@literal null}. * @return all entities sorted by the given options. */ Flowable findAll(Sort sort); diff --git a/src/main/java/org/springframework/data/repository/support/RepositoryInvoker.java b/src/main/java/org/springframework/data/repository/support/RepositoryInvoker.java index 50e2f16e7..a22b54386 100644 --- a/src/main/java/org/springframework/data/repository/support/RepositoryInvoker.java +++ b/src/main/java/org/springframework/data/repository/support/RepositoryInvoker.java @@ -60,7 +60,7 @@ public interface RepositoryInvoker extends RepositoryInvocationInformation { * contained in the given {@link Pageable}) or the plain equivalent to * {@link org.springframework.data.repository.CrudRepository#findAll()}. * - * @param pageable can be {@literal null}. + * @param pageable must not be {@literal null}. * @return the result of the invocation of the find-all method. * @throws IllegalStateException if the repository does not expose a find-all-method. */ @@ -72,7 +72,7 @@ public interface RepositoryInvoker extends RepositoryInvocationInformation { * {@link org.springframework.data.repository.PagingAndSortingRepository#findAll(Sort)}) or the plain equivalent to * {@link org.springframework.data.repository.CrudRepository#findAll()}. * - * @param sort can be {@literal null}. + * @param sort must not be {@literal null}. * @return the result of the invocation of the find-all method. * @throws IllegalStateException if the repository does not expose a find-all-method. */