Class UpdateResult


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getMatchedCount()
      Gets the number of documents matched by the query.
      long getModifiedCount()
      Gets the number of documents modified by the update.
      java.lang.Object getUpsertedId()
      If the replace resulted in an inserted document, gets the _id of the inserted document, 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
      • getMatchedCount

        public long getMatchedCount()
        Gets the number of documents matched by the query.
        Returns:
        the number of documents matched
      • getModifiedCount

        public long getModifiedCount()
        Gets the number of documents modified by the update.
        Returns:
        the number of documents modified
      • getUpsertedId

        public java.lang.Object getUpsertedId()
        If the replace resulted in an inserted document, gets the _id of the inserted document, otherwise null.
        Returns:
        if the replace resulted in an inserted document, the _id of the inserted document, otherwise null