Skip to content

Commit 1e2d294

Browse files
wonderfulrosemarimp911de
authored andcommitted
Polishing.
Refine public API Javadoc descriptions. Closes #2602 Original pull request: #3465 Signed-off-by: wonderfulrosemari <whwlsgur1419@naver.com>
1 parent 0311295 commit 1e2d294

5 files changed

Lines changed: 15 additions & 13 deletions

File tree

src/main/java/org/springframework/data/domain/Range.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public static <T> Range<T> of(Bound<T> lowerBound, Bound<T> upperBound) {
170170
/**
171171
* Creates a new Range with the given value as sole member.
172172
*
173-
* @param <T>
173+
* @param <T> the type of the range.
174174
* @param value must not be {@literal null}.
175175
* @return
176176
* @see Range#closed(Object, Object)

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> {
3636
* Saves a given entity. Use the returned instance for further operations as the save operation might have changed the
3737
* entity instance completely.
3838
*
39-
* @param entity must not be {@literal null}.
40-
* @return the saved entity; will never be {@literal null}.
39+
* @param entity the entity to save, must not be {@literal null}.
40+
* @return the saved entity.
4141
* @throws IllegalArgumentException in case the given {@literal entity} is {@literal null}.
4242
* @throws OptimisticLockingFailureException when the entity uses optimistic locking and has a version attribute with
4343
* a different value from that found in the persistence store. Also thrown if the entity is assumed to be
@@ -49,8 +49,8 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> {
4949
* Saves all given entities.
5050
*
5151
* @param entities must not be {@literal null} nor must it contain {@literal null}.
52-
* @return the saved entities; will never be {@literal null}. The returned {@literal Iterable} will have the same size
53-
* as the {@literal Iterable} passed as an argument.
52+
* @return the saved entities. The returned {@literal Iterable} will have the same size as the {@literal Iterable}
53+
* passed as an argument.
5454
* @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is
5555
* {@literal null}.
5656
* @throws OptimisticLockingFailureException when at least one entity uses optimistic locking and has a version
@@ -92,8 +92,7 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> {
9292
* Note that the order of elements in the result is not guaranteed.
9393
*
9494
* @param ids must not be {@literal null} nor contain any {@literal null} values.
95-
* @return guaranteed to be not {@literal null}. The size can be equal or less than the number of given
96-
* {@literal ids}.
95+
* @return iterable of found entities. The size can be equal or less than the number of given {@literal ids}.
9796
* @throws IllegalArgumentException in case the given {@link Iterable ids} or one of its items is {@literal null}.
9897
*/
9998
Iterable<T> findAllById(Iterable<ID> ids);

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,16 @@
4242
* The domain class the repository manages. Equivalent to the T type parameter in {@link Repository}.
4343
*
4444
* @see Repository
45-
* @return
45+
* @return the domain class managed by the repository.
4646
*/
4747
Class<?> domainClass();
4848

4949
/**
5050
* The id class of the entity the repository manages. Equivalent to the ID type parameter in {@link Repository}.
5151
*
5252
* @see Repository
53-
* @return
53+
* @return the id class of the entity managed by the repository.
5454
*/
5555
Class<?> idClass();
56+
5657
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
5252
* Saves a given entity. Use the returned instance for further operations as the save operation might have changed the
5353
* entity instance completely.
5454
*
55-
* @param entity must not be {@literal null}.
55+
* @param entity the entity to save, must not be {@literal null}.
5656
* @return {@link Mono} emitting the saved entity.
5757
* @throws IllegalArgumentException in case the given {@literal entity} is {@literal null}.
5858
* @throws OptimisticLockingFailureException when the entity uses optimistic locking and has a version attribute with
@@ -64,7 +64,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
6464
/**
6565
* Saves all given entities.
6666
*
67-
* @param entities must not be {@literal null}.
67+
* @param entities must not be {@literal null} nor must it contain {@literal null}.
6868
* @return {@link Flux} emitting the saved entities.
6969
* @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is
7070
* {@literal null}.
@@ -242,4 +242,5 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
242242
* @return {@link Mono} signaling when operation has completed.
243243
*/
244244
Mono<Void> deleteAll();
245+
245246
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public interface RxJava3CrudRepository<T, ID> extends Repository<T, ID> {
5252
* Saves a given entity. Use the returned instance for further operations as the save operation might have changed the
5353
* entity instance completely.
5454
*
55-
* @param entity must not be {@literal null}.
55+
* @param entity the entity to save, must not be {@literal null}.
5656
* @return {@link Single} emitting the saved entity.
5757
* @throws IllegalArgumentException in case the given {@literal entity} is {@literal null}.
5858
* @throws OptimisticLockingFailureException when the entity uses optimistic locking and has a version attribute with
@@ -64,7 +64,7 @@ public interface RxJava3CrudRepository<T, ID> extends Repository<T, ID> {
6464
/**
6565
* Saves all given entities.
6666
*
67-
* @param entities must not be {@literal null}.
67+
* @param entities must not be {@literal null} nor must it contain {@literal null}.
6868
* @return {@link Flowable} emitting the saved entities.
6969
* @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is
7070
* {@literal null}.
@@ -230,4 +230,5 @@ public interface RxJava3CrudRepository<T, ID> extends Repository<T, ID> {
230230
* @return {@link Completable} signaling when operation has completed.
231231
*/
232232
Completable deleteAll();
233+
233234
}

0 commit comments

Comments
 (0)