public class MongoClientBulkWriteResult extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_DELETED_COUNT
The default value is 0, signifying no document was deleted
|
static long |
DEFAULT_INSERTED_COUNT
The default value is 0, signifying no document was inserted
|
static long |
DEFAULT_MATCHED_COUNT
The default value is 0, signifying no document was matched
|
static long |
DEFAULT_MODIFIED_COUNT
The default value is 0, signifying no document was modified
|
static String |
DELETED_COUNT
Constant to be used when storing and retrieving Json for documents deleted.
|
static String |
ID
Constant to be used when storing and retrieving Json for ID of upsert information.
|
static String |
INDEX
Constant to be used when storing and retrieving Json for index of upsert information.
|
static String |
INSERTED_COUNT
Constant to be used when storing and retrieving Json for documents inserted.
|
static String |
MATCHED_COUNT
Constant to be used when storing and retrieving Json for documents matched.
|
static String |
MODIFIED_COUNT
Constant to be used when storing and retrieving Json for documents modified.
|
static String |
UPSERTS
Constant to be used when storing and retrieving Json for upsert information.
|
Constructor and Description |
---|
MongoClientBulkWriteResult()
Default constructor
|
MongoClientBulkWriteResult(JsonObject mongoClientBulkWriteResultJson)
Constructor from JSON
|
MongoClientBulkWriteResult(long insertedCount,
long matchedCount,
long deletedCount,
long modifiedCount,
List<JsonObject> upserts)
Constructor to specify the result of the bulk write operation.
|
MongoClientBulkWriteResult(MongoClientBulkWriteResult other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getDeletedCount()
Returns the number of deleted documents
|
long |
getInsertedCount()
Returns the number of inserted documents
|
long |
getMatchedCount()
Returns the number of matched documents
|
long |
getModifiedCount()
Returns the number of modified documents
|
List<JsonObject> |
getUpserts()
An unmodifiable list of upsert data.
|
int |
hashCode() |
JsonObject |
toJson()
Convert to JSON
|
public static final String INSERTED_COUNT
public static final String MATCHED_COUNT
public static final String MODIFIED_COUNT
public static final String DELETED_COUNT
public static final String UPSERTS
public static final String ID
public static final String INDEX
public static final long DEFAULT_INSERTED_COUNT
public static final long DEFAULT_MATCHED_COUNT
public static final long DEFAULT_DELETED_COUNT
public static final long DEFAULT_MODIFIED_COUNT
public MongoClientBulkWriteResult()
public MongoClientBulkWriteResult(long insertedCount, long matchedCount, long deletedCount, long modifiedCount, List<JsonObject> upserts)
insertedCount
- the number of inserted documentsmatchedCount
- the number of documents matched by update or replacementsdeletedCount
- the number of deleted documentsmodifiedCount
- the number of modified documentsupserts
- the list of upserted itemspublic MongoClientBulkWriteResult(MongoClientBulkWriteResult other)
other
- public MongoClientBulkWriteResult(JsonObject mongoClientBulkWriteResultJson)
mongoClientBulkWriteResultJson
- public JsonObject toJson()
public long getInsertedCount()
public long getMatchedCount()
public long getDeletedCount()
public long getModifiedCount()
public List<JsonObject> getUpserts()
Copyright © 2022 Eclipse. All rights reserved.