Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_DOCMATCHED
The default value is 0, signifying no match
|
static long |
DEFAULT_DOCMODIFIED
The default value is 0, signifying no document is modified
|
static String |
DOC_MATCHED
Constant to be used when storing and retrieving Json for documents matched.
|
static String |
DOC_MODIFIED
Constant to be used when storing and retrieving Json for documents modified.
|
static String |
ID_FIELD
Constant to be used when storing and retrieving the _id within upserted_id
|
static String |
UPSERTED_ID
Constant to be used when storing and retrieving Json for documents upserted id.
|
Constructor and Description |
---|
MongoClientUpdateResult()
Default constructor
|
MongoClientUpdateResult(JsonObject mongoClientUpdateResultJson)
Constructor from JSON
|
MongoClientUpdateResult(long docMatched,
JsonObject docUpsertedId,
long docModified)
Constructor to specify the status of the operation.
|
MongoClientUpdateResult(MongoClientUpdateResult mongoClientUpdateResultCopy)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getDocMatched()
Get the number of documents that're matched
|
long |
getDocModified()
Get the number of documents that're modified
|
JsonObject |
getDocUpsertedId()
Get the document id that's upserted
|
int |
hashCode() |
JsonObject |
toJson()
Convert to JSON
|
public static final long DEFAULT_DOCMATCHED
public static final long DEFAULT_DOCMODIFIED
public static final String DOC_MATCHED
public static final String UPSERTED_ID
public static final String DOC_MODIFIED
public static final String ID_FIELD
public MongoClientUpdateResult()
public MongoClientUpdateResult(long docMatched, JsonObject docUpsertedId, long docModified)
docMatched
- docUpsertedId
- docModified
- public MongoClientUpdateResult(MongoClientUpdateResult mongoClientUpdateResultCopy)
mongoClientUpdateResultCopy
- public MongoClientUpdateResult(JsonObject mongoClientUpdateResultJson)
mongoClientUpdateResultJson
- public JsonObject toJson()
public long getDocMatched()
public JsonObject getDocUpsertedId()
public long getDocModified()
Copyright © 2021 Eclipse. All rights reserved.