public final class MergeOptions
extends java.lang.Object
Aggregates.merge(String, MergeOptions),
Aggregates.merge(com.mongodb.MongoNamespace, MergeOptions)| Modifier and Type | Class and Description |
|---|---|
static class |
MergeOptions.WhenMatched
The behavior of $merge if a result document and an existing document in the collection have the same value for the specified on
field(s).
|
static class |
MergeOptions.WhenNotMatched
The behavior of $merge if a result document does not match an existing document in the out collection.
|
| Constructor and Description |
|---|
MergeOptions() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.List<java.lang.String> |
getUniqueIdentifier()
Gets the fields that act as a unique identifier for a document.
|
java.util.List<Variable<?>> |
getVariables()
Gets the variables accessible for use in the whenMatched pipeline
|
MergeOptions.WhenMatched |
getWhenMatched()
Gets the behavior of $merge if a result document and an existing document in the collection have the same value for the specified
on field(s).
|
java.util.List<Bson> |
getWhenMatchedPipeline()
Gets aggregation pipeline to update the document in the collection.
|
MergeOptions.WhenNotMatched |
getWhenNotMatched()
Gets the behavior of $merge if a result document does not match an existing document in the out collection.
|
int |
hashCode() |
java.lang.String |
toString() |
MergeOptions |
uniqueIdentifier(java.util.List<java.lang.String> uniqueIdentifier)
Sets the field that act as a unique identifier for a document.
|
MergeOptions |
uniqueIdentifier(java.lang.String uniqueIdentifier)
Sets the field that act as a unique identifier for a document.
|
MergeOptions |
variables(java.util.List<Variable<?>> variables)
Sets the variables accessible for use in the whenMatched pipeline.
|
MergeOptions |
whenMatched(MergeOptions.WhenMatched whenMatched)
Sets the behavior of $merge if a result document and an existing document in the collection have the same value for the specified
on field(s).
|
MergeOptions |
whenMatchedPipeline(java.util.List<Bson> whenMatchedPipeline)
Sets aggregation pipeline to update the document in the collection.
|
MergeOptions |
whenNotMatched(MergeOptions.WhenNotMatched whenNotMatched)
Sets the behavior of $merge if a result document does not match an existing document in the out collection.
|
public java.util.List<java.lang.String> getUniqueIdentifier()
public MergeOptions uniqueIdentifier(java.lang.String uniqueIdentifier)
uniqueIdentifier - the unique identifierpublic MergeOptions uniqueIdentifier(java.util.List<java.lang.String> uniqueIdentifier)
uniqueIdentifier - the unique identifierpublic MergeOptions.WhenMatched getWhenMatched()
public MergeOptions whenMatched(MergeOptions.WhenMatched whenMatched)
whenMatched - when matchedpublic java.util.List<Variable<?>> getVariables()
public MergeOptions variables(java.util.List<Variable<?>> variables)
variables - the variablespublic java.util.List<Bson> getWhenMatchedPipeline()
MergeOptions.WhenMatched.PIPELINEpublic MergeOptions whenMatchedPipeline(java.util.List<Bson> whenMatchedPipeline)
whenMatchedPipeline - when matched pipelineMergeOptions.WhenMatched.PIPELINEpublic MergeOptions.WhenNotMatched getWhenNotMatched()
public MergeOptions whenNotMatched(MergeOptions.WhenNotMatched whenNotMatched)
whenNotMatched - when not matchedpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2010 - 2023 Adobe. All Rights Reserved