Package io.vertx.ext.mongo
Class MongoClientBulkWriteResult
- java.lang.Object
-
- io.vertx.ext.mongo.MongoClientBulkWriteResult
-
public class MongoClientBulkWriteResult extends Object
Result propagated from mongodb driver bulk write result.- Author:
- sschmitt
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_DELETED_COUNT
The default value is 0, signifying no document was deletedstatic long
DEFAULT_INSERTED_COUNT
The default value is 0, signifying no document was insertedstatic long
DEFAULT_MATCHED_COUNT
The default value is 0, signifying no document was matchedstatic long
DEFAULT_MODIFIED_COUNT
The default value is 0, signifying no document was modifiedstatic String
DELETED_COUNT
Constant to be used when storing and retrieving Json for documents deleted.static String
ID
Constant to be used when storing and retrieving Json for ID of upsert information.static String
INDEX
Constant to be used when storing and retrieving Json for index of upsert information.static String
INSERTED_COUNT
Constant to be used when storing and retrieving Json for documents inserted.static String
INSERTS
Constant to be used when storing and retrieving Json for insert information.static String
MATCHED_COUNT
Constant to be used when storing and retrieving Json for documents matched.static String
MODIFIED_COUNT
Constant to be used when storing and retrieving Json for documents modified.static String
UPSERTS
Constant to be used when storing and retrieving Json for upsert information.
-
Constructor Summary
Constructors Constructor Description MongoClientBulkWriteResult()
Default constructorMongoClientBulkWriteResult(long insertedCount, long matchedCount, long deletedCount, long modifiedCount, List<JsonObject> upserts, List<JsonObject> inserts)
Constructor to specify the result of the bulk write operation.MongoClientBulkWriteResult(JsonObject mongoClientBulkWriteResultJson)
Constructor from JSONMongoClientBulkWriteResult(MongoClientBulkWriteResult other)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
long
getDeletedCount()
Returns the number of deleted documentslong
getInsertedCount()
Returns the number of inserted documentsList<JsonObject>
getInserts()
An unmodifiable list of inserts data.long
getMatchedCount()
Returns the number of matched documentslong
getModifiedCount()
Returns the number of modified documentsList<JsonObject>
getUpserts()
An unmodifiable list of upsert data.int
hashCode()
JsonObject
toJson()
Convert to JSON
-
-
-
Field Detail
-
INSERTED_COUNT
public static final String INSERTED_COUNT
Constant to be used when storing and retrieving Json for documents inserted.- See Also:
- Constant Field Values
-
MATCHED_COUNT
public static final String MATCHED_COUNT
Constant to be used when storing and retrieving Json for documents matched.- See Also:
- Constant Field Values
-
MODIFIED_COUNT
public static final String MODIFIED_COUNT
Constant to be used when storing and retrieving Json for documents modified.- See Also:
- Constant Field Values
-
DELETED_COUNT
public static final String DELETED_COUNT
Constant to be used when storing and retrieving Json for documents deleted.- See Also:
- Constant Field Values
-
UPSERTS
public static final String UPSERTS
Constant to be used when storing and retrieving Json for upsert information.- See Also:
- Constant Field Values
-
INSERTS
public static final String INSERTS
Constant to be used when storing and retrieving Json for insert information.- See Also:
- Constant Field Values
-
ID
public static final String ID
Constant to be used when storing and retrieving Json for ID of upsert information.- See Also:
- Constant Field Values
-
INDEX
public static final String INDEX
Constant to be used when storing and retrieving Json for index of upsert information.- See Also:
- Constant Field Values
-
DEFAULT_INSERTED_COUNT
public static final long DEFAULT_INSERTED_COUNT
The default value is 0, signifying no document was inserted- See Also:
- Constant Field Values
-
DEFAULT_MATCHED_COUNT
public static final long DEFAULT_MATCHED_COUNT
The default value is 0, signifying no document was matched- See Also:
- Constant Field Values
-
DEFAULT_DELETED_COUNT
public static final long DEFAULT_DELETED_COUNT
The default value is 0, signifying no document was deleted- See Also:
- Constant Field Values
-
DEFAULT_MODIFIED_COUNT
public static final long DEFAULT_MODIFIED_COUNT
The default value is 0, signifying no document was modified- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MongoClientBulkWriteResult
public MongoClientBulkWriteResult()
Default constructor
-
MongoClientBulkWriteResult
public MongoClientBulkWriteResult(long insertedCount, long matchedCount, long deletedCount, long modifiedCount, List<JsonObject> upserts, List<JsonObject> inserts)
Constructor to specify the result of the bulk write operation.- Parameters:
insertedCount
- the number of inserted documentsmatchedCount
- the number of documents matched by update or replacementsdeletedCount
- the number of deleted documentsmodifiedCount
- the number of modified documentsupserts
- the list of upserted itemsinserts
- the list of inserted items
-
MongoClientBulkWriteResult
public MongoClientBulkWriteResult(MongoClientBulkWriteResult other)
Copy constructor- Parameters:
other
-
-
MongoClientBulkWriteResult
public MongoClientBulkWriteResult(JsonObject mongoClientBulkWriteResultJson)
Constructor from JSON- Parameters:
mongoClientBulkWriteResultJson
-
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getInsertedCount
public long getInsertedCount()
Returns the number of inserted documents- Returns:
- the inserted documents
-
getMatchedCount
public long getMatchedCount()
Returns the number of matched documents- Returns:
- the matched documents
-
getDeletedCount
public long getDeletedCount()
Returns the number of deleted documents- Returns:
- the deleted documents
-
getModifiedCount
public long getModifiedCount()
Returns the number of modified documents- Returns:
- the modified documents
-
getUpserts
public List<JsonObject> getUpserts()
An unmodifiable list of upsert data. Each entry has the index of the request that lead to the upsert, and the generated ID of the upsert.- Returns:
- an unmodifiable list of upsert info
-
getInserts
public List<JsonObject> getInserts()
An unmodifiable list of inserts data. Each entry has the index of the request that lead to the insert, and the generated ID of the insert.- Returns:
- an unmodifiable list of insert info
-
-