Class BulkWriteUpsert


  • public class BulkWriteUpsert
    extends 
    Represents an item in the bulk write that was upserted.
    Since:
    3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      BulkWriteUpsert​(int index, BsonValue id)
      Construct an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean  o)  
      BsonValue getId()
      Gets the id of the upserted item.
      int getIndex()
      Gets the index of the upserted item based on the order it was added to the bulk write operation.
      int hashCode()  
      toString()  
      • Methods inherited from class java.lang.

        , , , , , , ,
    • Constructor Detail

      • BulkWriteUpsert

        public BulkWriteUpsert​(int index,
                               BsonValue id)
        Construct an instance.
        Parameters:
        index - the index in the list of bulk write requests that the upsert occurred in
        id - the id of the document that was inserted as the result of the upsert
    • Method Detail

      • getIndex

        public int getIndex()
        Gets the index of the upserted 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 upserted item.
        Returns:
        the id
      • equals

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

        public int hashCode()
        Overrides:
         in class 
      • toString

        public  toString()
        Overrides:
         in class