public class BulkOperation extends Object
| Constructor and Description | 
|---|
BulkOperation(JsonObject json)
Json constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static BulkOperation | 
createDelete(JsonObject filter)
Create a new delete operation with the given filter 
 | 
static BulkOperation | 
createInsert(JsonObject document)
Create a new insert operation with the given document 
 | 
static BulkOperation | 
createReplace(JsonObject filter,
             JsonObject document)
Create a new replace operation with the given filter and replace document 
 | 
static BulkOperation | 
createReplace(JsonObject filter,
             JsonObject document,
             boolean upsert)
Create a new replace operation with the given filter, replace document, and the upsert flag 
 | 
static BulkOperation | 
createUpdate(JsonObject filter,
            JsonObject document)
Create a new update operation with the given filter and update document 
 | 
static BulkOperation | 
createUpdate(JsonObject filter,
            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)  | 
JsonObject | 
getDocument()
Returns the document, used by insert, replace, and update operations 
 | 
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(JsonObject document)
Sets the document, used by insert, replace, and update operations 
 | 
BulkOperation | 
setFilter(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 
 | 
JsonObject | 
toJson()
Generate a json from this object 
 | 
public BulkOperation(JsonObject json)
json - the json objectpublic JsonObject toJson()
public static BulkOperation createDelete(JsonObject filter)
filter - the filterpublic static BulkOperation createInsert(JsonObject document)
document - the document to insertpublic static BulkOperation createReplace(JsonObject filter, JsonObject document)
filter - the filterdocument - the replace documentpublic static BulkOperation createReplace(JsonObject filter, JsonObject document, boolean upsert)
filter - the filterdocument - the replace documentupsert - the upsert flagpublic static BulkOperation createUpdate(JsonObject filter, JsonObject document)
filter - the filterdocument - the update documentpublic static BulkOperation createUpdate(JsonObject filter, 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 JsonObject getFilter()
public BulkOperation setFilter(JsonObject filter)
filter - the filter documentpublic JsonObject getDocument()
public BulkOperation setDocument(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.