Interface ReactiveUpdateOperation
- All Known Subinterfaces:
ReactiveFluentMongoOperations
,ReactiveMongoOperations
- All Known Implementing Classes:
ReactiveMongoTemplate
public interface ReactiveUpdateOperation
ReactiveUpdateOperation
allows creation and execution of reactive MongoDB update / findAndModify /
findAndReplace operations in a fluent API style. The starting domainType is used for mapping the
Query
provided via matching
, as well as
the Update
via apply
into the MongoDB specific
representations. The collection to operate on is by default derived from the initial domainType and can be
defined there via Document
. Using inCollection
allows
to override the collection name for the execution.
update(Jedi.class)
.inCollection("star-wars")
.matching(query(where("firstname").is("luke")))
.apply(new Update().set("lastname", "skywalker"))
.upsert();
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
DefineFindAndModifyOptions
(optional).static interface
DefineFindAndReplaceOptions
.static interface
Result type override (Optional).static interface
static interface
static interface
Compose findAndModify execution by calling one of the terminating methods.static interface
Compose findAndReplace execution by calling one of the terminating methods.static interface
Trigger replaceOne execution by calling one of the terminating methods.static interface
Compose update execution by calling one of the terminating methods.static interface
Explicitly define the name of the collection to perform operation in (optional).static interface
Define a filter query for theUpdate
(optional).static interface
Declare theUpdate
to apply. -
Method Summary
Modifier and TypeMethodDescriptionStart creating an update operation for the given domainType.
-
Method Details
-
update
Start creating an update operation for the given domainType.- Parameters:
domainType
- must not be null.- Returns:
- new instance of
ReactiveUpdateOperation.ReactiveUpdate
. Never null. - Throws:
IllegalArgumentException
- if domainType is null.
-