Package com.mongodb

Class WriteConcernError


  • public class WriteConcernError
    extends 
    An error representing a failure by the server to apply the requested write concern to the bulk operation.
    Since:
    2.12
    MongoDB documentation
    • Constructor Detail

      • WriteConcernError

        public WriteConcernError​(int code,
                                  message,
                                 DBObject details)
        Constructs a new instance.
        Parameters:
        code - the error code
        message - the error message
        details - any details
    • Method Detail

      • getCode

        public int getCode()
        Gets the code associated with this error.
        Returns:
        the code
      • getMessage

        public  getMessage()
        Gets the message associated with this error.
        Returns:
        the message
      • getDetails

        public DBObject getDetails()
        Gets the details associated with this error. This document will not be null, but may be empty.
        Returns:
        the details
      • equals

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

        public int hashCode()
        Overrides:
         in class 
      • toString

        public  toString()
        Overrides:
         in class