Interface ReactiveUpdateOperation.TerminatingFindAndReplace<T>
- All Superinterfaces:
ReactiveUpdateOperation.TerminatingReplace
- All Known Subinterfaces:
ReactiveUpdateOperation.FindAndReplaceWithOptions<T>, ReactiveUpdateOperation.FindAndReplaceWithProjection<T>
- Enclosing interface:
ReactiveUpdateOperation
public static interface ReactiveUpdateOperation.TerminatingFindAndReplace<T>
extends ReactiveUpdateOperation.TerminatingReplace
Compose findAndReplace execution by calling one of the terminating methods.
- Since:
- 2.1
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionFind, replace and return the first matching document.map(QueryResultConverter<? super T, ? extends R> converter) Map the query result to a different type usingQueryResultConverter.Methods inherited from interface ReactiveUpdateOperation.TerminatingReplace
replaceFirst
-
Method Details
-
map
@Contract("_ -> new") <R> ReactiveUpdateOperation.TerminatingFindAndReplace<R> map(QueryResultConverter<? super T, ? extends R> converter) Map the query result to a different type usingQueryResultConverter.- Type Parameters:
R-typeof the result.- Parameters:
converter- the converter, must not be null.- Returns:
- new instance of
ReactiveUpdateOperation.TerminatingFindAndModify. - Throws:
IllegalArgumentException- ifconverteris null.- Since:
- 5.0
-
findAndReplace
Find, replace and return the first matching document.- Returns:
Mono.empty()if nothing found. Never null.
-