Class MongoClientBulkWriteResult
java.lang.Object
io.vertx.ext.mongo.MongoClientBulkWriteResult
Result propagated from mongodb driver bulk write result.
- Author:
- sschmitt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe default value is 0, signifying no document was deletedstatic final longThe default value is 0, signifying no document was insertedstatic final longThe default value is 0, signifying no document was matchedstatic final longThe default value is 0, signifying no document was modifiedstatic final StringConstant to be used when storing and retrieving Json for documents deleted.static final StringConstant to be used when storing and retrieving Json for ID of upsert information.static final StringConstant to be used when storing and retrieving Json for index of upsert information.static final StringConstant to be used when storing and retrieving Json for documents inserted.static final StringConstant to be used when storing and retrieving Json for insert information.static final StringConstant to be used when storing and retrieving Json for documents matched.static final StringConstant to be used when storing and retrieving Json for documents modified.static final StringConstant to be used when storing and retrieving Json for upsert information. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorMongoClientBulkWriteResult(long insertedCount, long matchedCount, long deletedCount, long modifiedCount, List<JsonObject> upserts, List<JsonObject> inserts) Constructor to specify the result of the bulk write operation.MongoClientBulkWriteResult(JsonObject mongoClientBulkWriteResultJson) Constructor from JSONCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongReturns the number of deleted documentslongReturns the number of inserted documentsAn unmodifiable list of inserts data.longReturns the number of matched documentslongReturns the number of modified documentsAn unmodifiable list of upsert data.inthashCode()toJson()Convert to JSON
-
Field Details
-
INSERTED_COUNT
Constant to be used when storing and retrieving Json for documents inserted.- See Also:
-
MATCHED_COUNT
Constant to be used when storing and retrieving Json for documents matched.- See Also:
-
MODIFIED_COUNT
Constant to be used when storing and retrieving Json for documents modified.- See Also:
-
DELETED_COUNT
Constant to be used when storing and retrieving Json for documents deleted.- See Also:
-
UPSERTS
Constant to be used when storing and retrieving Json for upsert information.- See Also:
-
INSERTS
Constant to be used when storing and retrieving Json for insert information.- See Also:
-
ID
Constant to be used when storing and retrieving Json for ID of upsert information.- See Also:
-
INDEX
Constant to be used when storing and retrieving Json for index of upsert information.- See Also:
-
DEFAULT_INSERTED_COUNT
public static final long DEFAULT_INSERTED_COUNTThe default value is 0, signifying no document was inserted- See Also:
-
DEFAULT_MATCHED_COUNT
public static final long DEFAULT_MATCHED_COUNTThe default value is 0, signifying no document was matched- See Also:
-
DEFAULT_DELETED_COUNT
public static final long DEFAULT_DELETED_COUNTThe default value is 0, signifying no document was deleted- See Also:
-
DEFAULT_MODIFIED_COUNT
public static final long DEFAULT_MODIFIED_COUNTThe default value is 0, signifying no document was modified- See Also:
-
-
Constructor Details
-
MongoClientBulkWriteResult
public MongoClientBulkWriteResult()Default constructor -
MongoClientBulkWriteResult
public MongoClientBulkWriteResult(long insertedCount, long matchedCount, long deletedCount, long modifiedCount, List<JsonObject> upserts, List<JsonObject> inserts) Constructor to specify the result of the bulk write operation.- Parameters:
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 itemsinserts- the list of inserted items
-
MongoClientBulkWriteResult
Copy constructor- Parameters:
other-
-
MongoClientBulkWriteResult
Constructor from JSON- Parameters:
mongoClientBulkWriteResultJson-
-
-
Method Details
-
toJson
-
getInsertedCount
public long getInsertedCount()Returns the number of inserted documents- Returns:
- the inserted documents
-
getMatchedCount
public long getMatchedCount()Returns the number of matched documents- Returns:
- the matched documents
-
getDeletedCount
public long getDeletedCount()Returns the number of deleted documents- Returns:
- the deleted documents
-
getModifiedCount
public long getModifiedCount()Returns the number of modified documents- Returns:
- the modified documents
-
getUpserts
An unmodifiable list of upsert data. Each entry has the index of the request that lead to the upsert, and the generated ID of the upsert.- Returns:
- an unmodifiable list of upsert info
-
getInserts
An unmodifiable list of inserts data. Each entry has the index of the request that lead to the insert, and the generated ID of the insert.- Returns:
- an unmodifiable list of insert info
-
hashCode
-
equals
-