Browse Source

Polishing.

Refine public API Javadoc descriptions.

Closes #2602
Original pull request: #3465

Signed-off-by: wonderfulrosemari <whwlsgur1419@naver.com>
issue/3400-addendum
wonderfulrosemari 3 weeks ago committed by Mark Paluch
parent
commit
ef42e7e1d3
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973
  1. 2
      src/main/java/org/springframework/data/domain/Range.java
  2. 11
      src/main/java/org/springframework/data/repository/CrudRepository.java
  3. 5
      src/main/java/org/springframework/data/repository/RepositoryDefinition.java
  4. 5
      src/main/java/org/springframework/data/repository/reactive/ReactiveCrudRepository.java
  5. 5
      src/main/java/org/springframework/data/repository/reactive/RxJava3CrudRepository.java

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

@ -172,7 +172,7 @@ public final class Range<T> { @@ -172,7 +172,7 @@ public final class Range<T> {
/**
* Creates a new Range with the given value as sole member.
*
* @param <T> the type of the range.>
* @param <T> the type of the range.
* @param value must not be {@literal null}.
* @return a range containing the given value.
* @see Range#closed(Object, Object)

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

@ -36,8 +36,8 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> { @@ -36,8 +36,8 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> {
* Saves a given entity. Use the returned instance for further operations as the save operation might have changed the
* entity instance completely.
*
* @param entity must not be {@literal null}.
* @return the saved entity; will never be {@literal null}.
* @param entity the entity to save, must not be {@literal null}.
* @return the saved entity.
* @throws IllegalArgumentException in case the given {@literal entity} is {@literal null}.
* @throws OptimisticLockingFailureException when the entity uses optimistic locking and has a version attribute with
* 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> { @@ -49,8 +49,8 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> {
* Saves all given entities.
*
* @param entities must not be {@literal null} nor must it contain {@literal null}.
* @return the saved entities; will never be {@literal null}. The returned {@literal Iterable} will have the same size
* as the {@literal Iterable} passed as an argument.
* @return the saved entities. The returned {@literal Iterable} will have the same size as the {@literal Iterable}
* passed as an argument.
* @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is
* {@literal null}.
* @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> { @@ -92,8 +92,7 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> {
* Note that the order of elements in the result is not guaranteed.
*
* @param ids must not be {@literal null} nor contain any {@literal null} values.
* @return guaranteed to be not {@literal null}. The size can be equal or less than the number of given
* {@literal ids}.
* @return iterable of found entities. The size can be equal or less than the number of given {@literal ids}.
* @throws IllegalArgumentException in case the given {@link Iterable ids} or one of its items is {@literal null}.
*/
Iterable<T> findAllById(Iterable<ID> ids);

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

@ -42,7 +42,7 @@ public @interface RepositoryDefinition { @@ -42,7 +42,7 @@ public @interface RepositoryDefinition {
* The domain class the repository manages. Equivalent to the T type parameter in {@link Repository}.
*
* @see Repository
* @return
* @return the domain class managed by the repository.
*/
Class<?> domainClass();
@ -50,7 +50,8 @@ public @interface RepositoryDefinition { @@ -50,7 +50,8 @@ public @interface RepositoryDefinition {
* The id class of the entity the repository manages. Equivalent to the ID type parameter in {@link Repository}.
*
* @see Repository
* @return
* @return the id class of the entity managed by the repository.
*/
Class<?> idClass();
}

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

@ -52,7 +52,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> { @@ -52,7 +52,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
* Saves a given entity. Use the returned instance for further operations as the save operation might have changed the
* entity instance completely.
*
* @param entity must not be {@literal null}.
* @param entity the entity to save, must not be {@literal null}.
* @return {@link Mono} emitting the saved entity.
* @throws IllegalArgumentException in case the given {@literal entity} is {@literal null}.
* @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> { @@ -64,7 +64,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
/**
* Saves all given entities.
*
* @param entities must not be {@literal null}.
* @param entities must not be {@literal null} nor must it contain {@literal null}.
* @return {@link Flux} emitting the saved entities.
* @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is
* {@literal null}.
@ -242,4 +242,5 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> { @@ -242,4 +242,5 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
* @return {@link Mono} signaling when operation has completed.
*/
Mono<Void> deleteAll();
}

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

@ -52,7 +52,7 @@ public interface RxJava3CrudRepository<T, ID> extends Repository<T, ID> { @@ -52,7 +52,7 @@ public interface RxJava3CrudRepository<T, ID> extends Repository<T, ID> {
* Saves a given entity. Use the returned instance for further operations as the save operation might have changed the
* entity instance completely.
*
* @param entity must not be {@literal null}.
* @param entity the entity to save, must not be {@literal null}.
* @return {@link Single} emitting the saved entity.
* @throws IllegalArgumentException in case the given {@literal entity} is {@literal null}.
* @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> { @@ -64,7 +64,7 @@ public interface RxJava3CrudRepository<T, ID> extends Repository<T, ID> {
/**
* Saves all given entities.
*
* @param entities must not be {@literal null}.
* @param entities must not be {@literal null} nor must it contain {@literal null}.
* @return {@link Flowable} emitting the saved entities.
* @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is
* {@literal null}.
@ -230,4 +230,5 @@ public interface RxJava3CrudRepository<T, ID> extends Repository<T, ID> { @@ -230,4 +230,5 @@ public interface RxJava3CrudRepository<T, ID> extends Repository<T, ID> {
* @return {@link Completable} signaling when operation has completed.
*/
Completable deleteAll();
}

Loading…
Cancel
Save