Package com.mongodb.bulk
Class WriteConcernError
-
- com.mongodb.bulk.WriteConcernError
-
public class WriteConcernError extends
An error representing a failure by the server to apply the requested write concern to the bulk operation.- Since:
- 3.0
- MongoDB documentation
-
-
Constructor Summary
Constructors Constructor Description WriteConcernError(int code, codeName, message, BsonDocument details)
Constructs a new instance.WriteConcernError(int code, message, BsonDocument details)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
o)
int
getCode()
Gets the code associated with this error.getCodeName()
Gets the name associated with the error code.BsonDocument
getDetails()
Gets the details associated with this error.getMessage()
Gets the message associated with this error.int
hashCode()
toString()
-
-
-
Constructor Detail
-
WriteConcernError
public WriteConcernError(int code, codeName, message, BsonDocument details)
Constructs a new instance.- Parameters:
code
- the error codecodeName
- the error code namemessage
- the error messagedetails
- any details
-
WriteConcernError
public WriteConcernError(int code, message, BsonDocument details)
Deprecated.Constructs a new instance.- Parameters:
code
- the error codemessage
- the error messagedetails
- any details
-
-
Method Detail
-
getCode
public int getCode()
Gets the code associated with this error.- Returns:
- the code
-
getCodeName
public getCodeName()
Gets the name associated with the error code.- Returns:
- the error code name, which may be the empty string
- Since:
- 3.8
- Since server release
-
getMessage
public getMessage()
Gets the message associated with this error.- Returns:
- the message
-
getDetails
public BsonDocument 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
-
-