void | count(Bson filter, SingleResultCallback callback) Counts the number of documents in the collection according to the given options. |
void | count(ClientSession clientSession, SingleResultCallback callback) Counts the number of documents in the collection. |
void | countDocuments(SingleResultCallback callback) Counts the number of documents in the collection. |
void | createIndex(Bson key, SingleResultCallback callback) Creates an index. |
void | createIndex(Bson key, IndexOptions options, SingleResultCallback callback) Creates an index. |
void | createIndex(ClientSession clientSession, Bson key, SingleResultCallback callback) Creates an index. |
void | deleteMany(Bson filter, SingleResultCallback callback) Removes all documents from the collection that match the given query filter. |
void | deleteOne(Bson filter, SingleResultCallback callback) Removes at most one document from the collection that matches the given filter. |
DistinctIterable | distinct(String fieldName, Class resultClass) Gets the distinct values of the specified field name. |
void | drop(SingleResultCallback callback) Drops this collection from the Database. |
void | dropIndex(String indexName, SingleResultCallback callback) Drops the index given its name. |
void | dropIndex(Bson keys, SingleResultCallback callback) Drops the index given the keys used to create it. |
FindIterable | find() Finds all documents in the collection. |
FindIterable | find(Bson filter, Class resultClass) Finds all documents in the collection. |
FindIterable | find(ClientSession clientSession, Class resultClass) Finds all documents in the collection. |
FindIterable | find(ClientSession clientSession, Bson filter) Finds all documents in the collection. |
FindIterable | find(Class resultClass) Finds all documents in the collection. |
FindIterable | find(Bson filter) Finds all documents in the collection. |
FindIterable | find(ClientSession clientSession) Finds all documents in the collection. |
void | findOneAndDelete(Bson filter, FindOneAndDeleteOptions options, SingleResultCallback callback) Atomically find a document and remove it. |
void | findOneAndDelete(ClientSession clientSession, Bson filter, SingleResultCallback callback) Atomically find a document and remove it. |
void | findOneAndReplace(Bson filter, TDocument replacement, FindOneAndReplaceOptions options, SingleResultCallback callback) Atomically find a document and replace it. |
void | findOneAndReplace(ClientSession clientSession, Bson filter, TDocument replacement, SingleResultCallback callback) Atomically find a document and replace it. |
void | findOneAndReplace(Bson filter, TDocument replacement, SingleResultCallback callback) Atomically find a document and replace it. |
void | findOneAndUpdate(Bson filter, Bson update, FindOneAndUpdateOptions options, SingleResultCallback callback) Atomically find a document and update it. |
void | findOneAndUpdate(ClientSession clientSession, Bson filter, Bson update, SingleResultCallback callback) Atomically find a document and update it. |
void | findOneAndUpdate(Bson filter, List extends Bson> update, FindOneAndUpdateOptions options, SingleResultCallback callback) Atomically find a document and update it. |
void | findOneAndUpdate(ClientSession clientSession, Bson filter, List extends Bson> update, SingleResultCallback callback) Atomically find a document and update it. |
void | insertMany(List extends TDocument> documents, SingleResultCallback callback) Inserts one or more documents. |
void | insertOne(TDocument document, SingleResultCallback callback) Inserts the provided document. |
ListIndexesIterable | listIndexes(Class resultClass) Get all the indexes in this collection. |
ListIndexesIterable | listIndexes(ClientSession clientSession) Get all the indexes in this collection. |
ListIndexesIterable | listIndexes() Get all the indexes in this collection. |
void | replaceOne(Bson filter, TDocument replacement, UpdateOptions options, SingleResultCallback callback) Replace a document in the collection according to the specified arguments. |
void | replaceOne(Bson filter, TDocument replacement, ReplaceOptions options, SingleResultCallback callback) Replace a document in the collection according to the specified arguments. |
void | replaceOne(ClientSession clientSession, Bson filter, TDocument replacement, SingleResultCallback callback) Replace a document in the collection according to the specified arguments. |
void | updateMany(Bson filter, Bson update, UpdateOptions options, SingleResultCallback callback) Update all documents in the collection according to the specified arguments. |
void | updateMany(ClientSession clientSession, Bson filter, Bson update, SingleResultCallback callback) Update all documents in the collection according to the specified arguments. |
void | updateMany(Bson filter, List extends Bson> update, UpdateOptions updateOptions, SingleResultCallback callback) Update all documents in the collection according to the specified arguments. |
void | updateMany(ClientSession clientSession, Bson filter, List extends Bson> update, SingleResultCallback callback) Update all documents in the collection according to the specified arguments. |
void | updateOne(Bson filter, Bson update, UpdateOptions options, SingleResultCallback callback) Update a single document in the collection according to the specified arguments. |
void | updateOne(ClientSession clientSession, Bson filter, Bson update, SingleResultCallback callback) Update a single document in the collection according to the specified arguments. |
void | updateOne(Bson filter, List extends Bson> update, UpdateOptions updateOptions, SingleResultCallback callback) Update a single document in the collection according to the specified arguments. |
void | updateOne(ClientSession clientSession, Bson filter, List extends Bson> update, SingleResultCallback callback) Update a single document in the collection according to the specified arguments. |
void | updateOne(Bson filter, Bson update, SingleResultCallback callback) Update a single document in the collection according to the specified arguments. |
void | updateOne(Bson filter, List extends Bson> update, SingleResultCallback callback) Update a single document in the collection according to the specified arguments. |
MongoCollection | withWriteConcern(WriteConcern writeConcern) Create a new MongoCollection instance with a different write concern. |