Package com.mongodb.bulk
Class BulkWriteError
java.lang.Object
com.mongodb.WriteError
com.mongodb.bulk.BulkWriteError
Represents an error for an item included in a bulk write operation, e.g. a duplicate key error
- Since:
 - 3.0
 
- 
Constructor Summary
ConstructorsConstructorDescriptionBulkWriteError(int code, String message, BsonDocument details, int index) Constructs a new instance. - 
Method Summary
Methods inherited from class com.mongodb.WriteError
getCategory, getCode, getDetails, getMessage 
- 
Constructor Details
- 
BulkWriteError
Constructs a new instance.- Parameters:
 code- the error codemessage- the error messagedetails- details about the errorindex- the index of the item in the bulk write operation that had this error
 
 - 
 - 
Method Details
- 
getIndex
public int getIndex()The index of the item in the bulk write operation with this error.- Returns:
 - the index
 
 - 
equals
- Overrides:
 equalsin classWriteError
 - 
hashCode
public int hashCode()- Overrides:
 hashCodein classWriteError
 - 
toString
- Overrides:
 toStringin classWriteError
 
 -