15
15
*/
16
16
package org .springframework .data .neo4j .repository .support ;
17
17
18
- import org .springframework .data .neo4j .core .mapping .Neo4jPersistentProperty ;
19
18
import reactor .core .publisher .Flux ;
20
19
import reactor .core .publisher .Mono ;
21
20
26
25
import org .apiguardian .api .API ;
27
26
import org .neo4j .cypherdsl .core .Statement ;
28
27
import org .reactivestreams .Publisher ;
28
+
29
29
import org .springframework .data .domain .Sort ;
30
30
import org .springframework .data .neo4j .core .ReactiveNeo4jOperations ;
31
- import org .springframework .data .neo4j .core .mapping .Neo4jPersistentEntity ;
32
31
import org .springframework .data .neo4j .core .mapping .CypherGenerator ;
32
+ import org .springframework .data .neo4j .core .mapping .Neo4jPersistentEntity ;
33
+ import org .springframework .data .neo4j .core .mapping .Neo4jPersistentProperty ;
33
34
import org .springframework .data .neo4j .repository .query .CypherAdapterUtils ;
34
35
import org .springframework .data .repository .reactive .ReactiveSortingRepository ;
35
36
import org .springframework .stereotype .Repository ;
@@ -187,13 +188,14 @@ public Mono<Void> delete(T entity) {
187
188
188
189
/*
189
190
* (non-Javadoc)
190
- * @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteAll( )
191
+ * @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteAllById(java.lang.Iterabl )
191
192
*/
192
193
@ Override
193
- @ Transactional
194
- public Mono <Void > deleteAll () {
194
+ public Mono <Void > deleteAllById (Iterable <? extends ID > ids ) {
195
195
196
- return this .neo4jOperations .deleteAll (this .entityInformation .getJavaType ());
196
+ Assert .notNull (ids , "The given Iterable of ids must not be null!" );
197
+
198
+ return this .neo4jOperations .deleteAllById (ids , this .entityInformation .getJavaType ());
197
199
}
198
200
199
201
/*
@@ -211,14 +213,6 @@ public Mono<Void> deleteAll(Iterable<? extends T> entities) {
211
213
return this .neo4jOperations .deleteAllById (ids , this .entityInformation .getJavaType ());
212
214
}
213
215
214
- @ Override
215
- public Mono <Void > deleteAllById (Iterable <? extends ID > ids ) {
216
-
217
- Assert .notNull (ids , "The given Iterable of ids must not be null!" );
218
-
219
- return this .neo4jOperations .deleteAllById (ids , this .entityInformation .getJavaType ());
220
- }
221
-
222
216
/*
223
217
* (non-Javadoc)
224
218
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteAll(org.reactivestreams.Publisher)
@@ -230,4 +224,15 @@ public Mono<Void> deleteAll(Publisher<? extends T> entitiesPublisher) {
230
224
Assert .notNull (entitiesPublisher , "The given Publisher of entities must not be null!" );
231
225
return Flux .from (entitiesPublisher ).flatMap (this ::delete ).then ();
232
226
}
227
+
228
+ /*
229
+ * (non-Javadoc)
230
+ * @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteAll()
231
+ */
232
+ @ Override
233
+ @ Transactional
234
+ public Mono <Void > deleteAll () {
235
+
236
+ return this .neo4jOperations .deleteAll (this .entityInformation .getJavaType ());
237
+ }
233
238
}
0 commit comments