@ -756,6 +756,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -756,6 +756,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* fields specification . Must not be { @literal null } .
* @param replacement the replacement document . Must not be { @literal null } .
* @return the converted object that was updated or { @link Mono # empty ( ) } , if not found .
* @throws org . springframework . data . mapping . MappingException if the collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given replacement value .
* @since 2 . 1
* /
default < T > Mono < T > findAndReplace ( Query query , T replacement ) {
@ -795,6 +797,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -795,6 +797,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* @return the converted object that was updated or { @link Mono # empty ( ) } , if not found . Depending on the value of
* { @link FindAndReplaceOptions # isReturnNew ( ) } this will either be the object as it was before the update or
* as it is after the update .
* @throws org . springframework . data . mapping . MappingException if the collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given replacement value .
* @since 2 . 1
* /
default < T > Mono < T > findAndReplace ( Query query , T replacement , FindAndReplaceOptions options ) {
@ -865,6 +869,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -865,6 +869,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* @return the converted object that was updated or { @link Mono # empty ( ) } , if not found . Depending on the value of
* { @link FindAndReplaceOptions # isReturnNew ( ) } this will either be the object as it was before the update or
* as it is after the update .
* @throws org . springframework . data . mapping . MappingException if the collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given replacement value .
* @since 2 . 1
* /
default < S , T > Mono < T > findAndReplace ( Query query , S replacement , FindAndReplaceOptions options , Class < S > entityType ,
@ -951,6 +957,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -951,6 +957,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* { @literal null } .
* @param entityClass class that determines the collection to use . Must not be { @literal null } .
* @return the count of matching documents .
* @throws org . springframework . data . mapping . MappingException if the collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* /
Mono < Long > count ( Query query , Class < ? > entityClass ) ;
@ -1007,6 +1015,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1007,6 +1015,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
*
* @param entityClass must not be { @literal null } .
* @return a { @link Mono } emitting the estimated number of documents .
* @throws org . springframework . data . mapping . MappingException if the collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* @since 3 . 1
* /
default Mono < Long > estimatedCount ( Class < ? > entityClass ) {
@ -1045,6 +1055,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1045,6 +1055,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* @param objectToSave the object to store in the collection . Must not be { @literal null } .
* @return the inserted object .
* @throws IllegalArgumentException in case the { @code objectToSave } is collection - like .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given object type .
* /
< T > Mono < T > insert ( T objectToSave ) ;
@ -1070,7 +1082,9 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1070,7 +1082,9 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
*
* @param batchToSave the batch of objects to save . Must not be { @literal null } .
* @param entityClass class that determines the collection to use . Must not be { @literal null } .
* @return the inserted objects .
* @return the inserted objects .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* /
< T > Flux < T > insert ( Collection < ? extends T > batchToSave , Class < ? > entityClass ) ;
@ -1089,6 +1103,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1089,6 +1103,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
*
* @param objectsToSave the list of objects to save . Must not be { @literal null } .
* @return the saved objects .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } for the given objects .
* /
< T > Flux < T > insertAll ( Collection < ? extends T > objectsToSave ) ;
@ -1116,6 +1132,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1116,6 +1132,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* @param batchToSave the publisher which provides objects to save . Must not be { @literal null } .
* @param entityClass class that determines the collection to use . Must not be { @literal null } .
* @return the inserted objects .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } for the type .
* /
< T > Flux < T > insertAll ( Mono < ? extends Collection < ? extends T > > batchToSave , Class < ? > entityClass ) ;
@ -1155,6 +1173,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1155,6 +1173,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* @param objectToSave the object to store in the collection . Must not be { @literal null } .
* @return the saved object .
* @throws IllegalArgumentException in case the { @code objectToSave } is collection - like .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given object type .
* /
< T > Mono < T > save ( T objectToSave ) ;
@ -1191,6 +1211,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1191,6 +1211,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
*
* @param objectToSave the object to store in the collection . Must not be { @literal null } .
* @return the saved object .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given object type .
* /
< T > Mono < T > save ( Mono < ? extends T > objectToSave ) ;
@ -1224,6 +1246,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1224,6 +1246,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* the existing object . Must not be { @literal null } .
* @param entityClass class that determines the collection to use . Must not be { @literal null } .
* @return the { @link UpdateResult } which lets you access the results of the previous write .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* @since 3 . 0
* @see Update
* @see AggregationUpdate
@ -1278,6 +1302,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1278,6 +1302,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* the existing . Must not be { @literal null } .
* @param entityClass class that determines the collection to use .
* @return the { @link UpdateResult } which lets you access the results of the previous write .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* @since 3 . 0
* @see Update
* @see AggregationUpdate
@ -1333,6 +1359,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1333,6 +1359,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* @param entityClass class of the pojo to be operated on . Must not be { @literal null } .
* @return the { @link UpdateResult } which lets you access the results of the previous write .
* @since 3 . 0
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* @see Update
* @see AggregationUpdate
* /
@ -1379,6 +1407,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1379,6 +1407,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
*
* @param object must not be { @literal null } .
* @return the { @link DeleteResult } which lets you access the results of the previous delete .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given object type .
* /
Mono < DeleteResult > remove ( Object object ) ;
@ -1396,6 +1426,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1396,6 +1426,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
*
* @param objectToRemove must not be { @literal null } .
* @return the { @link DeleteResult } which lets you access the results of the previous delete .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given object type .
* /
Mono < DeleteResult > remove ( Mono < ? extends Object > objectToRemove ) ;
@ -1415,6 +1447,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1415,6 +1447,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* @param query the query document that specifies the criteria used to remove a record .
* @param entityClass class that determines the collection to use .
* @return the { @link DeleteResult } which lets you access the results of the previous delete .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* /
Mono < DeleteResult > remove ( Query query , Class < ? > entityClass ) ;
@ -1458,6 +1492,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1458,6 +1492,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* @param query the query document that specifies the criteria used to find and remove documents .
* @param entityClass class of the pojo to be operated on .
* @return the { @link Flux } converted objects deleted by this operation .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* /
< T > Flux < T > findAllAndRemove ( Query query , Class < T > entityClass ) ;
@ -1489,6 +1525,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1489,6 +1525,8 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* specification .
* @param entityClass the parametrized type of the returned { @link Flux } .
* @return the { @link Flux } of converted objects .
* @throws org . springframework . data . mapping . MappingException if the target collection name cannot be
* { @link # getCollectionName ( Class ) derived } from the given type .
* /
< T > Flux < T > tail ( Query query , Class < T > entityClass ) ;
@ -1633,6 +1671,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@@ -1633,6 +1671,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
*
* @param entityClass must not be { @literal null } .
* @return never { @literal null } .
* @throws org . springframework . data . mapping . MappingException if the collection name cannot be derived from the type .
* @since 2 . 1
* /
String getCollectionName ( Class < ? > entityClass ) ;