Class InsertOneResult


  • public class InsertOneResult
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getInsertedId()
      If the _id of the inserted document if available, otherwise null
      boolean isAcknowledged()
      Returns true if the write was acknowledged.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isAcknowledged

        public boolean isAcknowledged()
        Returns true if the write was acknowledged.
        Returns:
        true if the write was acknowledged
      • getInsertedId

        public java.lang.Object getInsertedId()
        If the _id of the inserted document if available, otherwise null

        Note: Inserting RawBsonDocuments does not generate an _id value.

        Returns:
        if _id of the inserted document if available, otherwise null