public interface ExecutableUpdateOperation
ExecutableUpdateOperation allows creation and execution of MongoDB update / findAndModify operations in a
fluent API style. 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();
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ExecutableUpdateOperation.ExecutableUpdate<T> |
static interface |
ExecutableUpdateOperation.FindAndModifyWithOptions<T>
Define
FindAndModifyOptions. |
static interface |
ExecutableUpdateOperation.TerminatingFindAndModify<T>
Trigger findAndModify execution by calling one of the terminating methods.
|
static interface |
ExecutableUpdateOperation.TerminatingUpdate<T>
Trigger update execution by calling one of the terminating methods.
|
static interface |
ExecutableUpdateOperation.UpdateWithCollection<T>
Explicitly define the name of the collection to perform operation in.
|
static interface |
ExecutableUpdateOperation.UpdateWithQuery<T>
Define a filter query for the
Update. |
static interface |
ExecutableUpdateOperation.UpdateWithUpdate<T>
Declare the
Update to apply. |
| Modifier and Type | Method and Description |
|---|---|
<T> ExecutableUpdateOperation.ExecutableUpdate<T> |
update(Class<T> domainType)
Start creating an update operation for the given domainType.
|
<T> ExecutableUpdateOperation.ExecutableUpdate<T> update(Class<T> domainType)
domainType - must not be null.ExecutableUpdateOperation.ExecutableUpdate.IllegalArgumentException - if domainType is null.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.