Package com.mongodb
Class BulkWriteError
java.lang.Object
com.mongodb.BulkWriteError
Represents an error for an item included in a bulk write operation, e.g. a duplicate key error
- Since:
- 2.12
- MongoDB documentation
- BulkWriteResult.writeErrors
- 
Constructor SummaryConstructorsConstructorDescriptionBulkWriteError(int code, String message, DBObject details, int index) Constructs a new instance.
- 
Method Summary
- 
Constructor Details- 
BulkWriteErrorConstructs 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 error
 
 
- 
- 
Method Details- 
getCodepublic int getCode()Gets the code associated with this error.- Returns:
- the code
 
- 
getMessageGets the message associated with this error.- Returns:
- the message
 
- 
getDetailsGets the details associated with this error. This document will not be null, but may be empty.- Returns:
- the details
 
- 
getIndexpublic int getIndex()The index of the item in the bulk write operation with this error.- Returns:
- the index
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-