io.vertx.ext.mongo

## Class MongoClientBulkWriteResult

- java.lang.Object
- - io.vertx.ext.mongo.MongoClientBulkWriteResult

-     public class MongoClientBulkWriteResult
      extends Object

  Result propagated from mongodb driver bulk write result.
  Author:
    sschmitt

- - ### Field Summary

    Fields
    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 Summary

    Constructors
    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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSERTED_COUNT

          public static final String INSERTED_COUNT

      Constant to be used when storing and retrieving Json for documents inserted.
      See Also:
        Constant Field Values

    - #### MATCHED_COUNT

          public static final String MATCHED_COUNT

      Constant to be used when storing and retrieving Json for documents matched.
      See Also:
        Constant Field Values

    - #### MODIFIED_COUNT

          public static final String MODIFIED_COUNT

      Constant to be used when storing and retrieving Json for documents modified.
      See Also:
        Constant Field Values

    - #### DELETED_COUNT

          public static final String DELETED_COUNT

      Constant to be used when storing and retrieving Json for documents deleted.
      See Also:
        Constant Field Values

    - #### UPSERTS

          public static final String UPSERTS

      Constant to be used when storing and retrieving Json for upsert information.
      See Also:
        Constant Field Values

    - #### ID

          public static final String ID

      Constant to be used when storing and retrieving Json for ID of upsert information.
      See Also:
        Constant Field Values

    - #### INDEX

          public static final String INDEX

      Constant to be used when storing and retrieving Json for index of upsert information.
      See Also:
        Constant Field Values

    - #### DEFAULT_INSERTED_COUNT

          public static final long DEFAULT_INSERTED_COUNT

      The default value is 0, signifying no document was inserted
      See Also:
        Constant Field Values

    - #### DEFAULT_MATCHED_COUNT

          public static final long DEFAULT_MATCHED_COUNT

      The default value is 0, signifying no document was matched
      See Also:
        Constant Field Values

    - #### DEFAULT_DELETED_COUNT

          public static final long DEFAULT_DELETED_COUNT

      The default value is 0, signifying no document was deleted
      See Also:
        Constant Field Values

    - #### DEFAULT_MODIFIED_COUNT

          public static final long DEFAULT_MODIFIED_COUNT

      The default value is 0, signifying no document was modified
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MongoClientBulkWriteResult

          public MongoClientBulkWriteResult()

      Default constructor

    - #### MongoClientBulkWriteResult

          public MongoClientBulkWriteResult(long insertedCount,
                                            long matchedCount,
                                            long deletedCount,
                                            long modifiedCount,
                                            List<JsonObject> upserts)

      Constructor to specify the result of the bulk write operation.
      Parameters:
        `insertedCount` - the number of inserted documents
        `matchedCount` - the number of documents matched by update or replacements
        `deletedCount` - the number of deleted documents
        `modifiedCount` - the number of modified documents
        `upserts` - the list of upserted items

    - #### MongoClientBulkWriteResult

          public MongoClientBulkWriteResult(MongoClientBulkWriteResult other)

      Copy constructor
      Parameters:
        `other` -

    - #### MongoClientBulkWriteResult

          public MongoClientBulkWriteResult(JsonObject mongoClientBulkWriteResultJson)

      Constructor from JSON
      Parameters:
        `mongoClientBulkWriteResultJson` -

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### 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

          public List<JsonObject> 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

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

Copyright © 2019 Eclipse. All rights reserved.