public class BulkUpdateRequestBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private BulkWriteOperation |
bulkWriteOperation |
private Collation |
collation |
private DBObject |
query |
private Encoder<DBObject> |
queryCodec |
private Encoder<DBObject> |
replacementCodec |
private boolean |
upsert |
Constructor and Description |
---|
BulkUpdateRequestBuilder(BulkWriteOperation bulkWriteOperation,
DBObject query,
boolean upsert,
Encoder<DBObject> queryCodec,
Encoder<DBObject> replacementCodec,
Collation collation) |
Modifier and Type | Method and Description |
---|---|
BulkUpdateRequestBuilder |
collation(Collation collation)
Sets the collation
|
Collation |
getCollation()
Returns the collation
|
void |
replaceOne(DBObject document)
Adds a request to replace one document in the collection that matches the query with which this builder was created.
|
void |
update(DBObject update)
Adds a request to update all documents in the collection that match the query with which this builder was created.
|
void |
updateOne(DBObject update)
Adds a request to update one document in the collection that matches the query with which this builder was created.
|
private final BulkWriteOperation bulkWriteOperation
private final DBObject query
private final boolean upsert
private Collation collation
public Collation getCollation()
public BulkUpdateRequestBuilder collation(Collation collation)
collation
- the collationpublic void replaceOne(DBObject document)
document
- the replacement document, which must be structured just as a document you would insert. It can not contain any
update operators.public void update(DBObject update)
update
- the update criteriapublic void updateOne(DBObject update)
update
- the update criteria