Calculates aggregate values for the data in this collection.
Calculates aggregate values for the data in this collection.
A sequence of data aggregation operations or stages.
Additional options that aggregate() passes to the aggregate command.
Calculates aggregate values for the data in this collection.
Calculates aggregate values for the data in this collection.
A sequence of data aggregation operations or stages.
Returns the count of documents that would match a find() query.
Returns the count of documents that would match a find() query. The count() method does not perform the find() operation but instead counts and returns the number of results that match a query.
Returns the count of documents that would match a find() query.
Returns the count of documents that would match a find() query. The count() method does not perform the find() operation but instead counts and returns the number of results that match a query.
Returns the count of documents that would match a find() query.
Returns the count of documents that would match a find() query. The count() method does not perform the find() operation but instead counts and returns the number of results that match a query.
Creates indexes on this collection.
Finds the distinct values for a specified field across a single collection and returns the results in an array.
Finds the distinct values for a specified field across a single collection and returns the results in an array.
The field for which to return distinct values.
A query that specifies the documents from which to retrieve the distinct values.
Finds the distinct values for a specified field across a single collection and returns the results in an array.
Finds the distinct values for a specified field across a single collection and returns the results in an array.
The field for which to return distinct values.
Drops this collection
Selects documents in this collection.
Selects documents in this collection.
Removes and returns a single document.
Removes and returns a single document.
The selection criteria for the remove.
Determines which model the operation removes if the query selects multiple models. findAndRemove() removes the first model in the sort order specified by this argument.
A subset of fields to return.
Updates and returns a single document.
Updates and returns a single document. It returns the old document by default.
The selection criteria for the update.
Determines which model the operation updates if the query selects multiple models. findAndUpdate() updates the first model in the sort order specified by this argument.
Performs an update of the selected model.
When true, returns the updated model rather than the original.
A subset of fields to return.
When true, findAndUpdate() creates a new model if no model matches the query.
Retrieves at most one document matching the given selector.
Retrieves at most one document matching the given selector.
Selector document.
number of documents to skip. Set to 0 if you don't want to skip any documents.
Retrieves at most one document matching the given selector.
Retrieves at most one document matching the given selector.
Selector document.
Retrieves a random document matching the given selector.
Returns a list of documents that identify and describe the existing indexes on the collection.
Validates this collection.
Validates this collection. The method scans a collection’s data structures for correctness and returns a single document that describes the relationship between the logical collection and the physical representation of the data.
Specify true to enable a full validation and to return full statistics. MongoDB disables full validation by default because it is a potentially resource-intensive operation.
if false skips the scan of the base collection without skipping the scan of the index.
Validates this collection.
Validates this collection. The method scans a collection’s data structures for correctness and returns a single document that describes the relationship between the logical collection and the physical representation of the data.
Specify true to enable a full validation and to return full statistics. MongoDB disables full validation by default because it is a potentially resource-intensive operation.
Validates this collection.
Validates this collection. The method scans a collection’s data structures for correctness and returns a single document that describes the relationship between the logical collection and the physical representation of the data.
Java 8 API for MongoCollection