Class MongoClientUpdateResult
java.lang.Object
io.vertx.ext.mongo.MongoClientUpdateResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe default value is 0, signifying no matchstatic final longThe default value is 0, signifying no document is modifiedstatic final StringConstant to be used when storing and retrieving Json for documents matched.static final StringConstant to be used when storing and retrieving Json for documents modified.static final StringConstant to be used when storing and retrieving the _id within upserted_idstatic final StringConstant to be used when storing and retrieving Json for documents upserted id. -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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
-
Field Details
-
DEFAULT_DOCMATCHED
public static final long DEFAULT_DOCMATCHEDThe default value is 0, signifying no match- See Also:
-
DEFAULT_DOCMODIFIED
public static final long DEFAULT_DOCMODIFIEDThe default value is 0, signifying no document is modified- See Also:
-
DOC_MATCHED
Constant to be used when storing and retrieving Json for documents matched.- See Also:
-
UPSERTED_ID
Constant to be used when storing and retrieving Json for documents upserted id.- See Also:
-
DOC_MODIFIED
Constant to be used when storing and retrieving Json for documents modified.- See Also:
-
ID_FIELD
Constant to be used when storing and retrieving the _id within upserted_id- See Also:
-
-
Constructor Details
-
MongoClientUpdateResult
public MongoClientUpdateResult()Default constructor -
MongoClientUpdateResult
Constructor to specify the status of the operation. Number of matched, upserted id JsonObject and number of doc modified.- Parameters:
docMatched-docUpsertedId-docModified-
-
MongoClientUpdateResult
Copy constructor- Parameters:
mongoClientUpdateResultCopy-
-
MongoClientUpdateResult
Constructor from JSON- Parameters:
mongoClientUpdateResultJson-
-
-
Method Details
-
toJson
-
getDocMatched
public long getDocMatched()Get the number of documents that're matched- Returns:
- number of documents that're matched
-
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
-
equals
-
hashCode
-