BulkWriteError (driver-core 5.5.0 API) (original) (raw)
public class BulkWriteError extends WriteError
Represents an error for an item included in a bulk write operation, e.g. a duplicate key error
Since:
3.0
Constructor Summary
Constructors
Constructs a new instance.
Method Summary
boolean
int
[getIndex](#getIndex%28%29)()
The index of the item in the bulk write operation with this error.int
[hashCode](#hashCode%28%29)()
[toString](#toString%28%29)()
Constructor Details
BulkWriteError
public BulkWriteError(int code,String message,BsonDocument details, int index)
Constructs a new instance.
Parameters:
code
- the error code
message
- the error message
details
- details about the error
index
- the index of the item in the bulk write operation that had this errorMethod Details
getIndex
public int getIndex()
The index of the item in the bulk write operation with this error.
Returns:
the indexequals
public boolean equals(Object o)
Overrides:
[equals](../WriteError.html#equals%28java.lang.Object%29)
in class[WriteError](../WriteError.html "class in com.mongodb")
hashCode
public int hashCode()
Overrides:
[hashCode](../WriteError.html#hashCode%28%29)
in class[WriteError](../WriteError.html "class in com.mongodb")
toString
Overrides:
[toString](../WriteError.html#toString%28%29)
in class[WriteError](../WriteError.html "class in com.mongodb")