Package io.vertx.ext.mongo
Class MongoClientUpdateResult
- java.lang.Object
-
- io.vertx.ext.mongo.MongoClientUpdateResult
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_DOCMATCHEDThe default value is 0, signifying no matchstatic longDEFAULT_DOCMODIFIEDThe default value is 0, signifying no document is modifiedstatic StringDOC_MATCHEDConstant to be used when storing and retrieving Json for documents matched.static StringDOC_MODIFIEDConstant to be used when storing and retrieving Json for documents modified.static StringID_FIELDConstant to be used when storing and retrieving the _id within upserted_idstatic StringUPSERTED_IDConstant to be used when storing and retrieving Json for documents upserted id.
-
Constructor Summary
Constructors Constructor Description MongoClientUpdateResult()Default constructorMongoClientUpdateResult(long docMatched, JsonObject docUpsertedId, long docModified)Constructor to specify the status of the operation.MongoClientUpdateResult(JsonObject mongoClientUpdateResultJson)Constructor from JSONMongoClientUpdateResult(MongoClientUpdateResult mongoClientUpdateResultCopy)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)longgetDocMatched()Get the number of documents that're matchedlonggetDocModified()Get the number of documents that're modifiedJsonObjectgetDocUpsertedId()Get the document id that's upsertedinthashCode()JsonObjecttoJson()Convert to JSON
-
-
-
Field Detail
-
DEFAULT_DOCMATCHED
public static final long DEFAULT_DOCMATCHED
The default value is 0, signifying no match- See Also:
- Constant Field Values
-
DEFAULT_DOCMODIFIED
public static final long DEFAULT_DOCMODIFIED
The default value is 0, signifying no document is modified- See Also:
- Constant Field Values
-
DOC_MATCHED
public static final String DOC_MATCHED
Constant to be used when storing and retrieving Json for documents matched.- See Also:
- Constant Field Values
-
UPSERTED_ID
public static final String UPSERTED_ID
Constant to be used when storing and retrieving Json for documents upserted id.- See Also:
- Constant Field Values
-
DOC_MODIFIED
public static final String DOC_MODIFIED
Constant to be used when storing and retrieving Json for documents modified.- See Also:
- Constant Field Values
-
ID_FIELD
public static final String ID_FIELD
Constant to be used when storing and retrieving the _id within upserted_id- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MongoClientUpdateResult
public MongoClientUpdateResult()
Default constructor
-
MongoClientUpdateResult
public MongoClientUpdateResult(long docMatched, JsonObject docUpsertedId, long docModified)Constructor to specify the status of the operation. Number of matched, upserted id JsonObject and number of doc modified.- Parameters:
docMatched-docUpsertedId-docModified-
-
MongoClientUpdateResult
public MongoClientUpdateResult(MongoClientUpdateResult mongoClientUpdateResultCopy)
Copy constructor- Parameters:
mongoClientUpdateResultCopy-
-
MongoClientUpdateResult
public MongoClientUpdateResult(JsonObject mongoClientUpdateResultJson)
Constructor from JSON- Parameters:
mongoClientUpdateResultJson-
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getDocMatched
public long getDocMatched()
Get the number of documents that're matched- Returns:
- number of documents that're matched
-
getDocUpsertedId
public JsonObject getDocUpsertedId()
Get the document id that's upserted- Returns:
- document id that's upserted
-
getDocModified
public long getDocModified()
Get the number of documents that're modified- Returns:
- number of documents that're modified
-
-