Skip to content

DATACMNS-800 - Adds deleteAllById to (Reactive)CrudRepository. #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>2.4.0-SNAPSHOT</version>
<version>2.4.0-DATACMNS-800-SNAPSHOT</version>

<name>Spring Data Core</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*
* @author Oliver Gierke
* @author Eberhard Wolff
* @author Jens Schauder
*/
@NoRepositoryBean
public interface CrudRepository<T, ID> extends Repository<T, ID> {
Expand Down Expand Up @@ -117,6 +118,15 @@ public interface CrudRepository<T, ID> extends Repository<T, ID> {
*/
void deleteAll(Iterable<? extends T> entities);

/**
* Deletes the given entities.
*
* @param ids must not be {@literal null}. Must not contain {@literal null} elements.
* @throws IllegalArgumentException in case the given {@literal ids} or one of its elements is {@literal null}.
* @since 3.0
*/
void deleteAllById(Iterable<? extends ID> ids);

/**
* Deletes all entities managed by the repository.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*
* @author Mark Paluch
* @author Christph Strobl
* @author Jens Schauder
* @since 2.0
* @see Mono
* @see Flux
Expand Down Expand Up @@ -179,6 +180,17 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
*/
Mono<Void> deleteAll(Iterable<? extends T> entities);

/**
* Deletes the given entities matching the given ids.
*
* @param ids 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}.
* @since 3.0
*/
Mono<Void> deleteAllById(Iterable<? extends ID> ids);

/**
* Deletes the given entities supplied by a {@link Publisher}.
*
Expand Down