Package com.mongodb
Class BulkWriteUpsert
-
- com.mongodb.BulkWriteUpsert
-
public class BulkWriteUpsert extends
Represents an upsert request in a bulk write operation that resulted in an insert. It contains the index of the upsert request in the operation and the value of the _id field of the inserted document.- Since:
- 2.12
- See Also:
BulkWriteRequestBuilder.upsert()
- MongoDB documentation
- Since server release
-
-
Constructor Summary
Constructors Constructor Description BulkWriteUpsert(int index, id)
Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
o)
getId()
Gets the id of the upserted item.int
getIndex()
Gets the index of the upserted item based on the order it was added to the bulk write operation.int
hashCode()
toString()
-
-
-
Method Detail
-
getIndex
public int getIndex()
Gets the index of the upserted item based on the order it was added to the bulk write operation.- Returns:
- the index
-
getId
public getId()
Gets the id of the upserted item.- Returns:
- the id
-
equals
public boolean equals( o)
- Overrides:
in class
-
hashCode
public int hashCode()
- Overrides:
in class
-
toString
public toString()
- Overrides:
in class
-
-