private static class UpdateResult.AcknowledgedUpdateResult extends UpdateResult
| Modifier and Type | Field and Description |
|---|---|
private long |
matchedCount |
private java.lang.Long |
modifiedCount |
private BsonValue |
upsertedId |
| Constructor and Description |
|---|
AcknowledgedUpdateResult(long matchedCount,
java.lang.Long modifiedCount,
BsonValue upsertedId) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
long |
getMatchedCount()
Gets the number of documents matched by the query.
|
long |
getModifiedCount()
Gets the number of documents modified by the update.
|
BsonValue |
getUpsertedId()
If the replace resulted in an inserted document, gets the _id of the inserted document, otherwise null.
|
int |
hashCode() |
boolean |
isModifiedCountAvailable()
Gets a value indicating whether the modified count is available.
|
java.lang.String |
toString() |
boolean |
wasAcknowledged()
Returns true if the write was acknowledged.
|
acknowledged, unacknowledgedprivate final long matchedCount
private final java.lang.Long modifiedCount
private final BsonValue upsertedId
public AcknowledgedUpdateResult(long matchedCount,
java.lang.Long modifiedCount,
BsonValue upsertedId)
public boolean wasAcknowledged()
UpdateResultwasAcknowledged in class UpdateResultpublic long getMatchedCount()
UpdateResultgetMatchedCount in class UpdateResultpublic boolean isModifiedCountAvailable()
UpdateResultThe modified count is only available when all servers have been upgraded to 2.6 or above.
isModifiedCountAvailable in class UpdateResultpublic long getModifiedCount()
UpdateResultgetModifiedCount in class UpdateResultpublic BsonValue getUpsertedId()
UpdateResultgetUpsertedId in class UpdateResultpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object