public class UpdateResult extends Object
| Constructor and Description |
|---|
UpdateResult(long matchedCount,
long modifiedCount,
BsonValue upsertedId)
Constructs a result.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getMatchedCount()
Returns the number of documents matched by the query.
|
long |
getModifiedCount()
Returns the number of documents modified.
|
BsonValue |
getUpsertedId()
If the replace resulted in an inserted document, gets the _id of the inserted document,
otherwise null.
|
public UpdateResult(long matchedCount,
long modifiedCount,
BsonValue upsertedId)
matchedCount - the number of documents matched by the query.modifiedCount - the number of documents modified.upsertedId - the _id of the inserted document if the replace resulted in an inserted
document, otherwise null.public long getMatchedCount()
public long getModifiedCount()
public BsonValue getUpsertedId()