Class BulkWriteInsert


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

      • BulkWriteInsert

        public BulkWriteInsert​(int index,
                               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 Detail

      • 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 BsonValue getId()
        Gets the id of the inserted item.
        Returns:
        the id
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object