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, unacknowledged
private 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()
UpdateResult
wasAcknowledged
in class UpdateResult
public long getMatchedCount()
UpdateResult
getMatchedCount
in class UpdateResult
public boolean isModifiedCountAvailable()
UpdateResult
The modified count is only available when all servers have been upgraded to 2.6 or above.
isModifiedCountAvailable
in class UpdateResult
public long getModifiedCount()
UpdateResult
getModifiedCount
in class UpdateResult
public BsonValue getUpsertedId()
UpdateResult
getUpsertedId
in class UpdateResult
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object