diff --git a/src/main/java/org/springframework/data/repository/CrudRepository.java b/src/main/java/org/springframework/data/repository/CrudRepository.java index 28a30a2d4..cc5eeb452 100644 --- a/src/main/java/org/springframework/data/repository/CrudRepository.java +++ b/src/main/java/org/springframework/data/repository/CrudRepository.java @@ -110,14 +110,6 @@ public interface CrudRepository extends Repository { */ void delete(T entity); - /** - * Deletes the given entities. - * - * @param entities must not be {@literal null}. Must not contain {@literal null} elements. - * @throws IllegalArgumentException in case the given {@literal entities} or one of its entities is {@literal null}. - */ - void deleteAll(Iterable entities); - /** * Deletes all instances of the type {@code T} with the given IDs. * @@ -127,6 +119,14 @@ public interface CrudRepository extends Repository { */ void deleteAllById(Iterable ids); + /** + * Deletes the given entities. + * + * @param entities must not be {@literal null}. Must not contain {@literal null} elements. + * @throws IllegalArgumentException in case the given {@literal entities} or one of its entities is {@literal null}. + */ + void deleteAll(Iterable entities); + /** * Deletes all entities managed by the repository. */ diff --git a/src/main/java/org/springframework/data/repository/reactive/ReactiveCrudRepository.java b/src/main/java/org/springframework/data/repository/reactive/ReactiveCrudRepository.java index 77d929418..d5f2a5747 100644 --- a/src/main/java/org/springframework/data/repository/reactive/ReactiveCrudRepository.java +++ b/src/main/java/org/springframework/data/repository/reactive/ReactiveCrudRepository.java @@ -170,16 +170,6 @@ public interface ReactiveCrudRepository extends Repository { */ Mono delete(T entity); - /** - * Deletes the given entities. - * - * @param entities must not be {@literal null}. - * @return {@link Mono} signaling when operation has completed. - * @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is - * {@literal null}. - */ - Mono deleteAll(Iterable entities); - /** * Deletes all instances of the type {@code T} with the given IDs. * @@ -191,6 +181,16 @@ public interface ReactiveCrudRepository extends Repository { */ Mono deleteAllById(Iterable ids); + /** + * Deletes the given entities. + * + * @param entities must not be {@literal null}. + * @return {@link Mono} signaling when operation has completed. + * @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is + * {@literal null}. + */ + Mono deleteAll(Iterable entities); + /** * Deletes the given entities supplied by a {@link Publisher}. * diff --git a/src/main/java/org/springframework/data/repository/reactive/RxJava2CrudRepository.java b/src/main/java/org/springframework/data/repository/reactive/RxJava2CrudRepository.java index 9a8b3aaa1..f84c25b5c 100644 --- a/src/main/java/org/springframework/data/repository/reactive/RxJava2CrudRepository.java +++ b/src/main/java/org/springframework/data/repository/reactive/RxJava2CrudRepository.java @@ -161,6 +161,17 @@ public interface RxJava2CrudRepository extends Repository { */ Completable delete(T entity); + /** + * Deletes all instances of the type {@code T} with the given IDs. + * + * @param ids must not be {@literal null}. + * @return {@link Completable} signaling when operation has completed. + * @throws IllegalArgumentException in case the given {@literal ids} or one of its elements is {@literal null}. + * {@literal null}. + * @since 2.5 + */ + Completable deleteAllById(Iterable ids); + /** * Deletes the given entities. * diff --git a/src/main/java/org/springframework/data/repository/reactive/RxJava3CrudRepository.java b/src/main/java/org/springframework/data/repository/reactive/RxJava3CrudRepository.java index 2897b5d01..d032a2bdc 100644 --- a/src/main/java/org/springframework/data/repository/reactive/RxJava3CrudRepository.java +++ b/src/main/java/org/springframework/data/repository/reactive/RxJava3CrudRepository.java @@ -161,6 +161,17 @@ public interface RxJava3CrudRepository extends Repository { */ Completable delete(T entity); + /** + * Deletes all instances of the type {@code T} with the given IDs. + * + * @param ids must not be {@literal null}. + * @return {@link Completable} signaling when operation has completed. + * @throws IllegalArgumentException in case the given {@literal ids} or one of its elements is {@literal null}. + * {@literal null}. + * @since 2.5 + */ + Completable deleteAllById(Iterable ids); + /** * Deletes the given entities. *