public class BulkOperation extends Object
Constructor and Description |
---|
BulkOperation(io.vertx.core.json.JsonObject json)
Json constructor
|
Modifier and Type | Method and Description |
---|---|
static BulkOperation |
createDelete(io.vertx.core.json.JsonObject filter)
Create a new delete operation with the given filter
|
static BulkOperation |
createInsert(io.vertx.core.json.JsonObject document)
Create a new insert operation with the given document
|
static BulkOperation |
createReplace(io.vertx.core.json.JsonObject filter,
io.vertx.core.json.JsonObject document)
Create a new replace operation with the given filter and replace document
|
static BulkOperation |
createReplace(io.vertx.core.json.JsonObject filter,
io.vertx.core.json.JsonObject document,
boolean upsert)
Create a new replace operation with the given filter, replace document, and the upsert flag
|
static BulkOperation |
createUpdate(io.vertx.core.json.JsonObject filter,
io.vertx.core.json.JsonObject document)
Create a new update operation with the given filter and update document
|
static BulkOperation |
createUpdate(io.vertx.core.json.JsonObject filter,
io.vertx.core.json.JsonObject document,
boolean upsert,
boolean multi)
Create a new update operation with the given filter, update document, the upsert flag, and multi flag
|
boolean |
equals(Object o) |
io.vertx.core.json.JsonObject |
getDocument()
Returns the document, used by insert, replace, and update operations
|
io.vertx.core.json.JsonObject |
getFilter()
Returns the filter document, used by replace, update, and delete operations
|
BulkOperationType |
getType()
Returns the operation type
|
int |
hashCode() |
boolean |
isMulti()
Returns the multi flag, used by update and delete operations
|
boolean |
isUpsert()
Returns the upsert flag, used by update and replace operations
|
BulkOperation |
setDocument(io.vertx.core.json.JsonObject document)
Sets the document, used by insert, replace, and update operations
|
BulkOperation |
setFilter(io.vertx.core.json.JsonObject filter)
Sets the filter document, used by replace, update, and delete operations
|
BulkOperation |
setMulti(boolean multi)
Sets the multi flag, used by update and delete operations
|
BulkOperation |
setType(BulkOperationType type)
Sets the operation type
|
BulkOperation |
setUpsert(boolean upsert)
Sets the upsert flag, used by update and replace operations
|
io.vertx.core.json.JsonObject |
toJson()
Generate a json from this object
|
public BulkOperation(io.vertx.core.json.JsonObject json)
json
- the json objectpublic io.vertx.core.json.JsonObject toJson()
public static BulkOperation createDelete(io.vertx.core.json.JsonObject filter)
filter
- the filterpublic static BulkOperation createInsert(io.vertx.core.json.JsonObject document)
document
- the document to insertpublic static BulkOperation createReplace(io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject document)
filter
- the filterdocument
- the replace documentpublic static BulkOperation createReplace(io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject document, boolean upsert)
filter
- the filterdocument
- the replace documentupsert
- the upsert flagpublic static BulkOperation createUpdate(io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject document)
filter
- the filterdocument
- the update documentpublic static BulkOperation createUpdate(io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject document, boolean upsert, boolean multi)
filter
- the filterdocument
- the update documentupsert
- the upsert flagmulti
- the multi flagpublic BulkOperationType getType()
public BulkOperation setType(BulkOperationType type)
type
- the operation typepublic io.vertx.core.json.JsonObject getFilter()
public BulkOperation setFilter(io.vertx.core.json.JsonObject filter)
filter
- the filter documentpublic io.vertx.core.json.JsonObject getDocument()
public BulkOperation setDocument(io.vertx.core.json.JsonObject document)
document
- the documentpublic boolean isUpsert()
public BulkOperation setUpsert(boolean upsert)
upsert
- the upsert flagpublic boolean isMulti()
public BulkOperation setMulti(boolean multi)
multi
- the mutli flagCopyright © 2021 Eclipse. All rights reserved.