Package com.mongodb
Class WriteError
- java.lang.Object
-
- com.mongodb.WriteError
-
- Direct Known Subclasses:
BulkWriteError
@Deprecated(since="2021-05-27") public class WriteError extends java.lang.ObjectDeprecated.Usage of this API is not supported in AEM as a Cloud Service.Represents the details of a write error , e.g. a duplicate key error- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description WriteError(int code, java.lang.String message, BsonDocument details)Deprecated.Constructs a new instance.WriteError(WriteError writeError)Deprecated.Construct an instance that is a shallow copy of the given instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Deprecated.ErrorCategorygetCategory()Deprecated.Gets the category of this error.intgetCode()Deprecated.Gets the code associated with this error.BsonDocumentgetDetails()Deprecated.Gets the details associated with this error.java.lang.StringgetMessage()Deprecated.Gets the message associated with this error.inthashCode()Deprecated.java.lang.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
WriteError
public WriteError(int code, java.lang.String message, BsonDocument details)Deprecated.Constructs a new instance.- Parameters:
code- the error codemessage- the error messagedetails- details about the error
-
WriteError
public WriteError(WriteError writeError)
Deprecated.Construct an instance that is a shallow copy of the given instance.- Parameters:
writeError- the write error to copy
-
-
Method Detail
-
getCategory
public ErrorCategory getCategory()
Deprecated.Gets the category of this error.- Returns:
- the category of this write error
-
getCode
public int getCode()
Deprecated.Gets the code associated with this error.- Returns:
- the code
-
getMessage
public java.lang.String getMessage()
Deprecated.Gets the message associated with this error.- Returns:
- the message
-
getDetails
public BsonDocument getDetails()
Deprecated.Gets the details associated with this error. This document will not be null, but may be empty.- Returns:
- the details
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-