Class BulkWriteInsert

java.lang.Object
com.mongodb.bulk.BulkWriteInsert

public class BulkWriteInsert extends Object
Represents an item in the bulk write that was inserted.
Since:
4.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    BulkWriteInsert(int index, org.bson.BsonValue id)
    Construct an instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    org.bson.BsonValue
    Gets the id of the inserted item.
    int
    Gets the index of the inserted item based on the order it was added to the bulk write operation.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BulkWriteInsert

      public BulkWriteInsert(int index, org.bson.BsonValue id)
      Construct an instance.
      Parameters:
      index - the index in the list of bulk write requests that the insert occurred in
      id - the id of the document that was inserted as the result of the insert
  • Method Details

    • getIndex

      public int getIndex()
      Gets the index of the inserted item based on the order it was added to the bulk write operation.
      Returns:
      the index
    • getId

      public org.bson.BsonValue getId()
      Gets the id of the inserted item.
      Returns:
      the id
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object