Package org.mongojack

Class MongoCollectionDecorator<TDocument>

  • All Implemented Interfaces:
    com.mongodb.client.MongoCollection<TDocument>
    Direct Known Subclasses:
    JacksonMongoCollection

    public abstract class MongoCollectionDecorator<TDocument>
    extends Object
    implements com.mongodb.client.MongoCollection<TDocument>
    A base class for decorating a MongoCollection.

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      com.mongodb.client.AggregateIterable<TDocument> aggregate​(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline)
      <TResult> com.mongodb.client.AggregateIterable<TResult> aggregate​(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline, Class<TResult> tResultClass)
      com.mongodb.client.AggregateIterable<TDocument> aggregate​(List<? extends org.bson.conversions.Bson> pipeline)
      <TResult> com.mongodb.client.AggregateIterable<TResult> aggregate​(List<? extends org.bson.conversions.Bson> pipeline, Class<TResult> tResultClass)
      com.mongodb.bulk.BulkWriteResult bulkWrite​(com.mongodb.client.ClientSession clientSession, List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests)
      com.mongodb.bulk.BulkWriteResult bulkWrite​(com.mongodb.client.ClientSession clientSession, List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests, com.mongodb.client.model.BulkWriteOptions options)
      com.mongodb.bulk.BulkWriteResult bulkWrite​(List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests)
      com.mongodb.bulk.BulkWriteResult bulkWrite​(List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests, com.mongodb.client.model.BulkWriteOptions options)
      long countDocuments()
      long countDocuments​(com.mongodb.client.ClientSession clientSession)
      long countDocuments​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      long countDocuments​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, com.mongodb.client.model.CountOptions options)
      long countDocuments​(org.bson.conversions.Bson filter)
      long countDocuments​(org.bson.conversions.Bson filter, com.mongodb.client.model.CountOptions options)
      String createIndex​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson keys)
      String createIndex​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson keys, com.mongodb.client.model.IndexOptions indexOptions)
      String createIndex​(org.bson.conversions.Bson keys)
      String createIndex​(org.bson.conversions.Bson keys, com.mongodb.client.model.IndexOptions indexOptions)
      List<String> createIndexes​(com.mongodb.client.ClientSession clientSession, List<com.mongodb.client.model.IndexModel> indexes)
      List<String> createIndexes​(com.mongodb.client.ClientSession clientSession, List<com.mongodb.client.model.IndexModel> indexes, com.mongodb.client.model.CreateIndexOptions createIndexOptions)
      List<String> createIndexes​(List<com.mongodb.client.model.IndexModel> indexes)
      List<String> createIndexes​(List<com.mongodb.client.model.IndexModel> indexes, com.mongodb.client.model.CreateIndexOptions createIndexOptions)
      com.mongodb.client.result.DeleteResult deleteMany​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      com.mongodb.client.result.DeleteResult deleteMany​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
      com.mongodb.client.result.DeleteResult deleteMany​(org.bson.conversions.Bson filter)
      com.mongodb.client.result.DeleteResult deleteMany​(org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
      com.mongodb.client.result.DeleteResult deleteOne​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      com.mongodb.client.result.DeleteResult deleteOne​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
      com.mongodb.client.result.DeleteResult deleteOne​(org.bson.conversions.Bson filter)
      com.mongodb.client.result.DeleteResult deleteOne​(org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
      <TResult> com.mongodb.client.DistinctIterable<TResult> distinct​(com.mongodb.client.ClientSession clientSession, String fieldName, Class<TResult> tResultClass)
      <TResult> com.mongodb.client.DistinctIterable<TResult> distinct​(com.mongodb.client.ClientSession clientSession, String fieldName, org.bson.conversions.Bson filter, Class<TResult> tResultClass)
      <TResult> com.mongodb.client.DistinctIterable<TResult> distinct​(String fieldName, Class<TResult> tResultClass)
      <TResult> com.mongodb.client.DistinctIterable<TResult> distinct​(String fieldName, org.bson.conversions.Bson filter, Class<TResult> tResultClass)
      void drop()
      void drop​(com.mongodb.client.ClientSession clientSession)
      void dropIndex​(com.mongodb.client.ClientSession clientSession, String indexName)
      void dropIndex​(com.mongodb.client.ClientSession clientSession, String indexName, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      void dropIndex​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson keys)
      void dropIndex​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson keys, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      void dropIndex​(String indexName)
      void dropIndex​(String indexName, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      void dropIndex​(org.bson.conversions.Bson keys)
      void dropIndex​(org.bson.conversions.Bson keys, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      void dropIndexes()
      void dropIndexes​(com.mongodb.client.ClientSession clientSession)
      void dropIndexes​(com.mongodb.client.ClientSession clientSession, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      void dropIndexes​(com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      long estimatedDocumentCount()
      long estimatedDocumentCount​(com.mongodb.client.model.EstimatedDocumentCountOptions options)
      com.mongodb.client.FindIterable<TDocument> find()
      com.mongodb.client.FindIterable<TDocument> find​(com.mongodb.client.ClientSession clientSession)
      <TResult> com.mongodb.client.FindIterable<TResult> find​(com.mongodb.client.ClientSession clientSession, Class<TResult> tResultClass)
      com.mongodb.client.FindIterable<TDocument> find​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      <TResult> com.mongodb.client.FindIterable<TResult> find​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, Class<TResult> tResultClass)
      <TResult> com.mongodb.client.FindIterable<TResult> find​(Class<TResult> tResultClass)
      com.mongodb.client.FindIterable<TDocument> find​(org.bson.conversions.Bson filter)
      <TResult> com.mongodb.client.FindIterable<TResult> find​(org.bson.conversions.Bson filter, Class<TResult> tResultClass)
      TDocument findOneAndDelete​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      TDocument findOneAndDelete​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, com.mongodb.client.model.FindOneAndDeleteOptions options)
      TDocument findOneAndDelete​(org.bson.conversions.Bson filter)
      TDocument findOneAndDelete​(org.bson.conversions.Bson filter, com.mongodb.client.model.FindOneAndDeleteOptions options)
      TDocument findOneAndReplace​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, TDocument replacement)
      TDocument findOneAndReplace​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, TDocument replacement, com.mongodb.client.model.FindOneAndReplaceOptions options)
      TDocument findOneAndReplace​(org.bson.conversions.Bson filter, TDocument replacement)
      TDocument findOneAndReplace​(org.bson.conversions.Bson filter, TDocument replacement, com.mongodb.client.model.FindOneAndReplaceOptions options)
      TDocument findOneAndUpdate​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update)
      TDocument findOneAndUpdate​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update, com.mongodb.client.model.FindOneAndUpdateOptions options)
      TDocument findOneAndUpdate​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      TDocument findOneAndUpdate​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.FindOneAndUpdateOptions options)
      TDocument findOneAndUpdate​(org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update)
      TDocument findOneAndUpdate​(org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update, com.mongodb.client.model.FindOneAndUpdateOptions options)
      TDocument findOneAndUpdate​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      TDocument findOneAndUpdate​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.FindOneAndUpdateOptions options)
      org.bson.codecs.configuration.CodecRegistry getCodecRegistry()
      Class<TDocument> getDocumentClass()
      com.mongodb.MongoNamespace getNamespace()
      com.mongodb.ReadConcern getReadConcern()
      com.mongodb.ReadPreference getReadPreference()
      com.mongodb.WriteConcern getWriteConcern()
      com.mongodb.client.result.InsertManyResult insertMany​(com.mongodb.client.ClientSession clientSession, List<? extends TDocument> tDocuments)
      com.mongodb.client.result.InsertManyResult insertMany​(com.mongodb.client.ClientSession clientSession, List<? extends TDocument> tDocuments, com.mongodb.client.model.InsertManyOptions options)
      com.mongodb.client.result.InsertManyResult insertMany​(List<? extends TDocument> tDocuments)
      com.mongodb.client.result.InsertManyResult insertMany​(List<? extends TDocument> tDocuments, com.mongodb.client.model.InsertManyOptions options)
      com.mongodb.client.result.InsertOneResult insertOne​(com.mongodb.client.ClientSession clientSession, TDocument tDocument)
      com.mongodb.client.result.InsertOneResult insertOne​(com.mongodb.client.ClientSession clientSession, TDocument tDocument, com.mongodb.client.model.InsertOneOptions options)
      com.mongodb.client.result.InsertOneResult insertOne​(TDocument tDocument)
      com.mongodb.client.result.InsertOneResult insertOne​(TDocument tDocument, com.mongodb.client.model.InsertOneOptions options)
      com.mongodb.client.ListIndexesIterable<org.bson.Document> listIndexes()
      com.mongodb.client.ListIndexesIterable<org.bson.Document> listIndexes​(com.mongodb.client.ClientSession clientSession)
      <TResult> com.mongodb.client.ListIndexesIterable<TResult> listIndexes​(com.mongodb.client.ClientSession clientSession, Class<TResult> tResultClass)
      <TResult> com.mongodb.client.ListIndexesIterable<TResult> listIndexes​(Class<TResult> tResultClass)
      protected abstract List<org.bson.conversions.Bson> manageAggregationPipeline​(List<? extends org.bson.conversions.Bson> pipeline)
      Manage the input Bson in any way necessary to produce a proper pipeline.
      protected abstract List<com.mongodb.client.model.WriteModel<TDocument>> manageBulkWriteRequests​(List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests)
      Manages the input write bson for a bulk write.
      protected abstract org.bson.conversions.Bson manageFilterBson​(org.bson.conversions.Bson filter)
      Manage the input Bson in any way necessary to produce a proper filter.
      protected abstract org.bson.conversions.Bson manageUpdateBson​(org.bson.conversions.Bson update)
      Manage the input Bson in any way necessary to produce a proper update.
      protected abstract List<org.bson.conversions.Bson> manageUpdatePipeline​(List<? extends org.bson.conversions.Bson> update)
      Manage the input Bson in any way necessary to produce a proper update.
      com.mongodb.client.MapReduceIterable<TDocument> mapReduce​(com.mongodb.client.ClientSession clientSession, String mapFunction, String reduceFunction)
      <TResult> com.mongodb.client.MapReduceIterable<TResult> mapReduce​(com.mongodb.client.ClientSession clientSession, String mapFunction, String reduceFunction, Class<TResult> tResultClass)
      com.mongodb.client.MapReduceIterable<TDocument> mapReduce​(String mapFunction, String reduceFunction)
      <TResult> com.mongodb.client.MapReduceIterable<TResult> mapReduce​(String mapFunction, String reduceFunction, Class<TResult> tResultClass)
      protected abstract com.mongodb.client.MongoCollection<TDocument> mongoCollection()
      Get the mongo collection that we're operating on.
      void renameCollection​(com.mongodb.client.ClientSession clientSession, com.mongodb.MongoNamespace newCollectionNamespace)
      void renameCollection​(com.mongodb.client.ClientSession clientSession, com.mongodb.MongoNamespace newCollectionNamespace, com.mongodb.client.model.RenameCollectionOptions renameCollectionOptions)
      void renameCollection​(com.mongodb.MongoNamespace newCollectionNamespace)
      void renameCollection​(com.mongodb.MongoNamespace newCollectionNamespace, com.mongodb.client.model.RenameCollectionOptions renameCollectionOptions)
      com.mongodb.client.result.UpdateResult replaceOne​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, TDocument replacement)
      com.mongodb.client.result.UpdateResult replaceOne​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, TDocument replacement, com.mongodb.client.model.ReplaceOptions replaceOptions)
      com.mongodb.client.result.UpdateResult replaceOne​(org.bson.conversions.Bson filter, TDocument replacement)
      com.mongodb.client.result.UpdateResult replaceOne​(org.bson.conversions.Bson filter, TDocument replacement, com.mongodb.client.model.ReplaceOptions replaceOptions)
      com.mongodb.client.result.UpdateResult updateMany​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update)
      com.mongodb.client.result.UpdateResult updateMany​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update, com.mongodb.client.model.UpdateOptions updateOptions)
      com.mongodb.client.result.UpdateResult updateMany​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      com.mongodb.client.result.UpdateResult updateMany​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.UpdateOptions updateOptions)
      com.mongodb.client.result.UpdateResult updateMany​(org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update)
      com.mongodb.client.result.UpdateResult updateMany​(org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update, com.mongodb.client.model.UpdateOptions updateOptions)
      com.mongodb.client.result.UpdateResult updateMany​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      com.mongodb.client.result.UpdateResult updateMany​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.UpdateOptions updateOptions)
      com.mongodb.client.result.UpdateResult updateOne​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update)
      com.mongodb.client.result.UpdateResult updateOne​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update, com.mongodb.client.model.UpdateOptions updateOptions)
      com.mongodb.client.result.UpdateResult updateOne​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      com.mongodb.client.result.UpdateResult updateOne​(com.mongodb.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.UpdateOptions updateOptions)
      com.mongodb.client.result.UpdateResult updateOne​(org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update)
      com.mongodb.client.result.UpdateResult updateOne​(org.bson.conversions.Bson filter, List<? extends org.bson.conversions.Bson> update, com.mongodb.client.model.UpdateOptions updateOptions)
      com.mongodb.client.result.UpdateResult updateOne​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      com.mongodb.client.result.UpdateResult updateOne​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.UpdateOptions updateOptions)
      com.mongodb.client.ChangeStreamIterable<TDocument> watch()
      com.mongodb.client.ChangeStreamIterable<TDocument> watch​(com.mongodb.client.ClientSession clientSession)
      <TResult> com.mongodb.client.ChangeStreamIterable<TResult> watch​(com.mongodb.client.ClientSession clientSession, Class<TResult> tResultClass)
      com.mongodb.client.ChangeStreamIterable<TDocument> watch​(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline)
      <TResult> com.mongodb.client.ChangeStreamIterable<TResult> watch​(com.mongodb.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline, Class<TResult> tResultClass)
      <TResult> com.mongodb.client.ChangeStreamIterable<TResult> watch​(Class<TResult> tResultClass)
      com.mongodb.client.ChangeStreamIterable<TDocument> watch​(List<? extends org.bson.conversions.Bson> pipeline)
      <TResult> com.mongodb.client.ChangeStreamIterable<TResult> watch​(List<? extends org.bson.conversions.Bson> pipeline, Class<TResult> tResultClass)
      protected abstract <T> com.mongodb.client.DistinctIterable<T> wrapIterable​(com.mongodb.client.DistinctIterable<T> input)
      Wraps an iterable that supports further .filter() calls so that we can perform mapping on them.
      protected abstract <T> com.mongodb.client.FindIterable<T> wrapIterable​(com.mongodb.client.FindIterable<T> input)
      Wraps an iterable that supports further .filter() calls so that we can perform mapping on them.
      protected abstract <T> com.mongodb.client.MapReduceIterable<T> wrapIterable​(com.mongodb.client.MapReduceIterable<T> input)
      Wraps an iterable that supports further .filter() calls so that we can perform mapping on them.
      • Methods inherited from interface com.mongodb.client.MongoCollection

        createSearchIndex, createSearchIndex, createSearchIndexes, drop, drop, dropSearchIndex, listSearchIndexes, listSearchIndexes, updateSearchIndex, withCodecRegistry, withDocumentClass, withReadConcern, withReadPreference, withWriteConcern
    • Constructor Detail

      • MongoCollectionDecorator

        public MongoCollectionDecorator()
    • Method Detail

      • mongoCollection

        protected abstract com.mongodb.client.MongoCollection<TDocument> mongoCollection()
        Get the mongo collection that we're operating on.
        Returns:
        A mongo collection. Must not be null. Must not be this.
      • manageUpdateBson

        protected abstract org.bson.conversions.Bson manageUpdateBson​(org.bson.conversions.Bson update)
        Manage the input Bson in any way necessary to produce a proper update. The expectation is that this is passed through the mapper or the codec, but the implementation is free to do what it wants as long as the returned Bson is valid.
        Parameters:
        update - a valid Bson update document (e.g. containing $set, etc).
        Returns:
        a valid Bson update document (e.g. containing $set, etc) transformed as necessary
      • manageUpdatePipeline

        protected abstract List<org.bson.conversions.Bson> manageUpdatePipeline​(List<? extends org.bson.conversions.Bson> update)
        Manage the input Bson in any way necessary to produce a proper update. The expectation is that this is passed through the mapper or the codec, but the implementation is free to do what it wants as long as the returned Bson is valid.
        Parameters:
        update - a valid Bson update pipeline (e.g. containing $set, etc).
        Returns:
        a valid Bson update pipeline (e.g. containing $set, etc) transformed as necessary
      • manageFilterBson

        protected abstract org.bson.conversions.Bson manageFilterBson​(org.bson.conversions.Bson filter)
        Manage the input Bson in any way necessary to produce a proper filter. The expectation is that this is passed through the mapper or the codec, but the implementation is free to do what it wants as long as the returned Bson is valid.
        Parameters:
        filter - a valid Bson filter document.
        Returns:
        a valid Bson filter document transformed as necessary
      • manageAggregationPipeline

        protected abstract List<org.bson.conversions.Bson> manageAggregationPipeline​(List<? extends org.bson.conversions.Bson> pipeline)
        Manage the input Bson in any way necessary to produce a proper pipeline. The expectation is that this is passed through the mapper or the codec, but the implementation is free to do what it wants as long as the returned Bson is valid.
        Parameters:
        pipeline - a list of Bson documents making up an aggregation pipeline
        Returns:
        a list of Bson documents making up an aggregation pipeline, transformed as necessary
      • manageBulkWriteRequests

        protected abstract List<com.mongodb.client.model.WriteModel<TDocument>> manageBulkWriteRequests​(List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests)
        Manages the input write bson for a bulk write.
        Parameters:
        requests - A list of WriteModel instances
        Returns:
        A list of WriteModel instances with filter and update BSON documents updated with the mapper
      • wrapIterable

        protected abstract <T> com.mongodb.client.DistinctIterable<T> wrapIterable​(com.mongodb.client.DistinctIterable<T> input)
        Wraps an iterable that supports further .filter() calls so that we can perform mapping on them.
        Type Parameters:
        T - return type of the iterable
        Parameters:
        input - a valid iterable
        Returns:
        a wrapped iterable that supports some extended filter operations
      • wrapIterable

        protected abstract <T> com.mongodb.client.FindIterable<T> wrapIterable​(com.mongodb.client.FindIterable<T> input)
        Wraps an iterable that supports further .filter() calls so that we can perform mapping on them.
        Type Parameters:
        T - return type of the iterable
        Parameters:
        input - a valid iterable
        Returns:
        a wrapped iterable that supports some extended filter operations
      • wrapIterable

        protected abstract <T> com.mongodb.client.MapReduceIterable<T> wrapIterable​(com.mongodb.client.MapReduceIterable<T> input)
        Wraps an iterable that supports further .filter() calls so that we can perform mapping on them.
        Type Parameters:
        T - return type of the iterable
        Parameters:
        input - a valid iterable
        Returns:
        a wrapped iterable that supports some extended filter operations
      • getNamespace

        public com.mongodb.MongoNamespace getNamespace()
        Specified by:
        getNamespace in interface com.mongodb.client.MongoCollection<TDocument>
      • getDocumentClass

        public Class<TDocument> getDocumentClass()
        Specified by:
        getDocumentClass in interface com.mongodb.client.MongoCollection<TDocument>
      • getCodecRegistry

        public org.bson.codecs.configuration.CodecRegistry getCodecRegistry()
        Specified by:
        getCodecRegistry in interface com.mongodb.client.MongoCollection<TDocument>
      • getReadPreference

        public com.mongodb.ReadPreference getReadPreference()
        Specified by:
        getReadPreference in interface com.mongodb.client.MongoCollection<TDocument>
      • getWriteConcern

        public com.mongodb.WriteConcern getWriteConcern()
        Specified by:
        getWriteConcern in interface com.mongodb.client.MongoCollection<TDocument>
      • getReadConcern

        public com.mongodb.ReadConcern getReadConcern()
        Specified by:
        getReadConcern in interface com.mongodb.client.MongoCollection<TDocument>
      • countDocuments

        public long countDocuments()
        Specified by:
        countDocuments in interface com.mongodb.client.MongoCollection<TDocument>
      • countDocuments

        public long countDocuments​(org.bson.conversions.Bson filter)
        Specified by:
        countDocuments in interface com.mongodb.client.MongoCollection<TDocument>
      • countDocuments

        public long countDocuments​(org.bson.conversions.Bson filter,
                                   com.mongodb.client.model.CountOptions options)
        Specified by:
        countDocuments in interface com.mongodb.client.MongoCollection<TDocument>
      • countDocuments

        public long countDocuments​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        countDocuments in interface com.mongodb.client.MongoCollection<TDocument>
      • countDocuments

        public long countDocuments​(com.mongodb.client.ClientSession clientSession,
                                   org.bson.conversions.Bson filter)
        Specified by:
        countDocuments in interface com.mongodb.client.MongoCollection<TDocument>
      • countDocuments

        public long countDocuments​(com.mongodb.client.ClientSession clientSession,
                                   org.bson.conversions.Bson filter,
                                   com.mongodb.client.model.CountOptions options)
        Specified by:
        countDocuments in interface com.mongodb.client.MongoCollection<TDocument>
      • estimatedDocumentCount

        public long estimatedDocumentCount()
        Specified by:
        estimatedDocumentCount in interface com.mongodb.client.MongoCollection<TDocument>
      • estimatedDocumentCount

        public long estimatedDocumentCount​(com.mongodb.client.model.EstimatedDocumentCountOptions options)
        Specified by:
        estimatedDocumentCount in interface com.mongodb.client.MongoCollection<TDocument>
      • distinct

        public <TResult> com.mongodb.client.DistinctIterable<TResult> distinct​(String fieldName,
                                                                               Class<TResult> tResultClass)
        Specified by:
        distinct in interface com.mongodb.client.MongoCollection<TDocument>
      • distinct

        public <TResult> com.mongodb.client.DistinctIterable<TResult> distinct​(String fieldName,
                                                                               org.bson.conversions.Bson filter,
                                                                               Class<TResult> tResultClass)
        Specified by:
        distinct in interface com.mongodb.client.MongoCollection<TDocument>
      • distinct

        public <TResult> com.mongodb.client.DistinctIterable<TResult> distinct​(com.mongodb.client.ClientSession clientSession,
                                                                               String fieldName,
                                                                               Class<TResult> tResultClass)
        Specified by:
        distinct in interface com.mongodb.client.MongoCollection<TDocument>
      • distinct

        public <TResult> com.mongodb.client.DistinctIterable<TResult> distinct​(com.mongodb.client.ClientSession clientSession,
                                                                               String fieldName,
                                                                               org.bson.conversions.Bson filter,
                                                                               Class<TResult> tResultClass)
        Specified by:
        distinct in interface com.mongodb.client.MongoCollection<TDocument>
      • find

        public com.mongodb.client.FindIterable<TDocument> find()
        Specified by:
        find in interface com.mongodb.client.MongoCollection<TDocument>
      • find

        public <TResult> com.mongodb.client.FindIterable<TResult> find​(Class<TResult> tResultClass)
        Specified by:
        find in interface com.mongodb.client.MongoCollection<TDocument>
      • find

        public com.mongodb.client.FindIterable<TDocument> find​(org.bson.conversions.Bson filter)
        Specified by:
        find in interface com.mongodb.client.MongoCollection<TDocument>
      • find

        public <TResult> com.mongodb.client.FindIterable<TResult> find​(org.bson.conversions.Bson filter,
                                                                       Class<TResult> tResultClass)
        Specified by:
        find in interface com.mongodb.client.MongoCollection<TDocument>
      • find

        public com.mongodb.client.FindIterable<TDocument> find​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        find in interface com.mongodb.client.MongoCollection<TDocument>
      • find

        public <TResult> com.mongodb.client.FindIterable<TResult> find​(com.mongodb.client.ClientSession clientSession,
                                                                       Class<TResult> tResultClass)
        Specified by:
        find in interface com.mongodb.client.MongoCollection<TDocument>
      • find

        public com.mongodb.client.FindIterable<TDocument> find​(com.mongodb.client.ClientSession clientSession,
                                                               org.bson.conversions.Bson filter)
        Specified by:
        find in interface com.mongodb.client.MongoCollection<TDocument>
      • find

        public <TResult> com.mongodb.client.FindIterable<TResult> find​(com.mongodb.client.ClientSession clientSession,
                                                                       org.bson.conversions.Bson filter,
                                                                       Class<TResult> tResultClass)
        Specified by:
        find in interface com.mongodb.client.MongoCollection<TDocument>
      • aggregate

        public com.mongodb.client.AggregateIterable<TDocument> aggregate​(List<? extends org.bson.conversions.Bson> pipeline)
        Specified by:
        aggregate in interface com.mongodb.client.MongoCollection<TDocument>
      • aggregate

        public <TResult> com.mongodb.client.AggregateIterable<TResult> aggregate​(List<? extends org.bson.conversions.Bson> pipeline,
                                                                                 Class<TResult> tResultClass)
        Specified by:
        aggregate in interface com.mongodb.client.MongoCollection<TDocument>
      • aggregate

        public com.mongodb.client.AggregateIterable<TDocument> aggregate​(com.mongodb.client.ClientSession clientSession,
                                                                         List<? extends org.bson.conversions.Bson> pipeline)
        Specified by:
        aggregate in interface com.mongodb.client.MongoCollection<TDocument>
      • aggregate

        public <TResult> com.mongodb.client.AggregateIterable<TResult> aggregate​(com.mongodb.client.ClientSession clientSession,
                                                                                 List<? extends org.bson.conversions.Bson> pipeline,
                                                                                 Class<TResult> tResultClass)
        Specified by:
        aggregate in interface com.mongodb.client.MongoCollection<TDocument>
      • watch

        public com.mongodb.client.ChangeStreamIterable<TDocument> watch()
        Specified by:
        watch in interface com.mongodb.client.MongoCollection<TDocument>
      • watch

        public <TResult> com.mongodb.client.ChangeStreamIterable<TResult> watch​(Class<TResult> tResultClass)
        Specified by:
        watch in interface com.mongodb.client.MongoCollection<TDocument>
      • watch

        public com.mongodb.client.ChangeStreamIterable<TDocument> watch​(List<? extends org.bson.conversions.Bson> pipeline)
        Specified by:
        watch in interface com.mongodb.client.MongoCollection<TDocument>
      • watch

        public <TResult> com.mongodb.client.ChangeStreamIterable<TResult> watch​(List<? extends org.bson.conversions.Bson> pipeline,
                                                                                Class<TResult> tResultClass)
        Specified by:
        watch in interface com.mongodb.client.MongoCollection<TDocument>
      • watch

        public com.mongodb.client.ChangeStreamIterable<TDocument> watch​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        watch in interface com.mongodb.client.MongoCollection<TDocument>
      • watch

        public <TResult> com.mongodb.client.ChangeStreamIterable<TResult> watch​(com.mongodb.client.ClientSession clientSession,
                                                                                Class<TResult> tResultClass)
        Specified by:
        watch in interface com.mongodb.client.MongoCollection<TDocument>
      • watch

        public com.mongodb.client.ChangeStreamIterable<TDocument> watch​(com.mongodb.client.ClientSession clientSession,
                                                                        List<? extends org.bson.conversions.Bson> pipeline)
        Specified by:
        watch in interface com.mongodb.client.MongoCollection<TDocument>
      • watch

        public <TResult> com.mongodb.client.ChangeStreamIterable<TResult> watch​(com.mongodb.client.ClientSession clientSession,
                                                                                List<? extends org.bson.conversions.Bson> pipeline,
                                                                                Class<TResult> tResultClass)
        Specified by:
        watch in interface com.mongodb.client.MongoCollection<TDocument>
      • mapReduce

        public com.mongodb.client.MapReduceIterable<TDocument> mapReduce​(String mapFunction,
                                                                         String reduceFunction)
        Specified by:
        mapReduce in interface com.mongodb.client.MongoCollection<TDocument>
      • mapReduce

        public <TResult> com.mongodb.client.MapReduceIterable<TResult> mapReduce​(String mapFunction,
                                                                                 String reduceFunction,
                                                                                 Class<TResult> tResultClass)
        Specified by:
        mapReduce in interface com.mongodb.client.MongoCollection<TDocument>
      • mapReduce

        public com.mongodb.client.MapReduceIterable<TDocument> mapReduce​(com.mongodb.client.ClientSession clientSession,
                                                                         String mapFunction,
                                                                         String reduceFunction)
        Specified by:
        mapReduce in interface com.mongodb.client.MongoCollection<TDocument>
      • mapReduce

        public <TResult> com.mongodb.client.MapReduceIterable<TResult> mapReduce​(com.mongodb.client.ClientSession clientSession,
                                                                                 String mapFunction,
                                                                                 String reduceFunction,
                                                                                 Class<TResult> tResultClass)
        Specified by:
        mapReduce in interface com.mongodb.client.MongoCollection<TDocument>
      • bulkWrite

        public com.mongodb.bulk.BulkWriteResult bulkWrite​(List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests)
        Specified by:
        bulkWrite in interface com.mongodb.client.MongoCollection<TDocument>
      • bulkWrite

        public com.mongodb.bulk.BulkWriteResult bulkWrite​(List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests,
                                                          com.mongodb.client.model.BulkWriteOptions options)
        Specified by:
        bulkWrite in interface com.mongodb.client.MongoCollection<TDocument>
      • bulkWrite

        public com.mongodb.bulk.BulkWriteResult bulkWrite​(com.mongodb.client.ClientSession clientSession,
                                                          List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests)
        Specified by:
        bulkWrite in interface com.mongodb.client.MongoCollection<TDocument>
      • bulkWrite

        public com.mongodb.bulk.BulkWriteResult bulkWrite​(com.mongodb.client.ClientSession clientSession,
                                                          List<? extends com.mongodb.client.model.WriteModel<? extends TDocument>> requests,
                                                          com.mongodb.client.model.BulkWriteOptions options)
        Specified by:
        bulkWrite in interface com.mongodb.client.MongoCollection<TDocument>
      • insertOne

        public com.mongodb.client.result.InsertOneResult insertOne​(TDocument tDocument)
        Specified by:
        insertOne in interface com.mongodb.client.MongoCollection<TDocument>
      • insertOne

        public com.mongodb.client.result.InsertOneResult insertOne​(TDocument tDocument,
                                                                   com.mongodb.client.model.InsertOneOptions options)
        Specified by:
        insertOne in interface com.mongodb.client.MongoCollection<TDocument>
      • insertOne

        public com.mongodb.client.result.InsertOneResult insertOne​(com.mongodb.client.ClientSession clientSession,
                                                                   TDocument tDocument)
        Specified by:
        insertOne in interface com.mongodb.client.MongoCollection<TDocument>
      • insertOne

        public com.mongodb.client.result.InsertOneResult insertOne​(com.mongodb.client.ClientSession clientSession,
                                                                   TDocument tDocument,
                                                                   com.mongodb.client.model.InsertOneOptions options)
        Specified by:
        insertOne in interface com.mongodb.client.MongoCollection<TDocument>
      • insertMany

        public com.mongodb.client.result.InsertManyResult insertMany​(List<? extends TDocument> tDocuments)
        Specified by:
        insertMany in interface com.mongodb.client.MongoCollection<TDocument>
      • insertMany

        public com.mongodb.client.result.InsertManyResult insertMany​(List<? extends TDocument> tDocuments,
                                                                     com.mongodb.client.model.InsertManyOptions options)
        Specified by:
        insertMany in interface com.mongodb.client.MongoCollection<TDocument>
      • insertMany

        public com.mongodb.client.result.InsertManyResult insertMany​(com.mongodb.client.ClientSession clientSession,
                                                                     List<? extends TDocument> tDocuments)
        Specified by:
        insertMany in interface com.mongodb.client.MongoCollection<TDocument>
      • insertMany

        public com.mongodb.client.result.InsertManyResult insertMany​(com.mongodb.client.ClientSession clientSession,
                                                                     List<? extends TDocument> tDocuments,
                                                                     com.mongodb.client.model.InsertManyOptions options)
        Specified by:
        insertMany in interface com.mongodb.client.MongoCollection<TDocument>
      • deleteOne

        public com.mongodb.client.result.DeleteResult deleteOne​(org.bson.conversions.Bson filter)
        Specified by:
        deleteOne in interface com.mongodb.client.MongoCollection<TDocument>
      • deleteOne

        public com.mongodb.client.result.DeleteResult deleteOne​(org.bson.conversions.Bson filter,
                                                                com.mongodb.client.model.DeleteOptions options)
        Specified by:
        deleteOne in interface com.mongodb.client.MongoCollection<TDocument>
      • deleteOne

        public com.mongodb.client.result.DeleteResult deleteOne​(com.mongodb.client.ClientSession clientSession,
                                                                org.bson.conversions.Bson filter)
        Specified by:
        deleteOne in interface com.mongodb.client.MongoCollection<TDocument>
      • deleteOne

        public com.mongodb.client.result.DeleteResult deleteOne​(com.mongodb.client.ClientSession clientSession,
                                                                org.bson.conversions.Bson filter,
                                                                com.mongodb.client.model.DeleteOptions options)
        Specified by:
        deleteOne in interface com.mongodb.client.MongoCollection<TDocument>
      • deleteMany

        public com.mongodb.client.result.DeleteResult deleteMany​(org.bson.conversions.Bson filter)
        Specified by:
        deleteMany in interface com.mongodb.client.MongoCollection<TDocument>
      • deleteMany

        public com.mongodb.client.result.DeleteResult deleteMany​(org.bson.conversions.Bson filter,
                                                                 com.mongodb.client.model.DeleteOptions options)
        Specified by:
        deleteMany in interface com.mongodb.client.MongoCollection<TDocument>
      • deleteMany

        public com.mongodb.client.result.DeleteResult deleteMany​(com.mongodb.client.ClientSession clientSession,
                                                                 org.bson.conversions.Bson filter)
        Specified by:
        deleteMany in interface com.mongodb.client.MongoCollection<TDocument>
      • deleteMany

        public com.mongodb.client.result.DeleteResult deleteMany​(com.mongodb.client.ClientSession clientSession,
                                                                 org.bson.conversions.Bson filter,
                                                                 com.mongodb.client.model.DeleteOptions options)
        Specified by:
        deleteMany in interface com.mongodb.client.MongoCollection<TDocument>
      • replaceOne

        public com.mongodb.client.result.UpdateResult replaceOne​(org.bson.conversions.Bson filter,
                                                                 TDocument replacement)
        Specified by:
        replaceOne in interface com.mongodb.client.MongoCollection<TDocument>
      • replaceOne

        public com.mongodb.client.result.UpdateResult replaceOne​(org.bson.conversions.Bson filter,
                                                                 TDocument replacement,
                                                                 com.mongodb.client.model.ReplaceOptions replaceOptions)
        Specified by:
        replaceOne in interface com.mongodb.client.MongoCollection<TDocument>
      • replaceOne

        public com.mongodb.client.result.UpdateResult replaceOne​(com.mongodb.client.ClientSession clientSession,
                                                                 org.bson.conversions.Bson filter,
                                                                 TDocument replacement)
        Specified by:
        replaceOne in interface com.mongodb.client.MongoCollection<TDocument>
      • replaceOne

        public com.mongodb.client.result.UpdateResult replaceOne​(com.mongodb.client.ClientSession clientSession,
                                                                 org.bson.conversions.Bson filter,
                                                                 TDocument replacement,
                                                                 com.mongodb.client.model.ReplaceOptions replaceOptions)
        Specified by:
        replaceOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateOne

        public com.mongodb.client.result.UpdateResult updateOne​(org.bson.conversions.Bson filter,
                                                                org.bson.conversions.Bson update)
        Specified by:
        updateOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateOne

        public com.mongodb.client.result.UpdateResult updateOne​(org.bson.conversions.Bson filter,
                                                                org.bson.conversions.Bson update,
                                                                com.mongodb.client.model.UpdateOptions updateOptions)
        Specified by:
        updateOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateOne

        public com.mongodb.client.result.UpdateResult updateOne​(com.mongodb.client.ClientSession clientSession,
                                                                org.bson.conversions.Bson filter,
                                                                org.bson.conversions.Bson update)
        Specified by:
        updateOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateOne

        public com.mongodb.client.result.UpdateResult updateOne​(com.mongodb.client.ClientSession clientSession,
                                                                org.bson.conversions.Bson filter,
                                                                org.bson.conversions.Bson update,
                                                                com.mongodb.client.model.UpdateOptions updateOptions)
        Specified by:
        updateOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateOne

        public com.mongodb.client.result.UpdateResult updateOne​(org.bson.conversions.Bson filter,
                                                                List<? extends org.bson.conversions.Bson> update)
        Specified by:
        updateOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateOne

        public com.mongodb.client.result.UpdateResult updateOne​(org.bson.conversions.Bson filter,
                                                                List<? extends org.bson.conversions.Bson> update,
                                                                com.mongodb.client.model.UpdateOptions updateOptions)
        Specified by:
        updateOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateOne

        public com.mongodb.client.result.UpdateResult updateOne​(com.mongodb.client.ClientSession clientSession,
                                                                org.bson.conversions.Bson filter,
                                                                List<? extends org.bson.conversions.Bson> update)
        Specified by:
        updateOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateOne

        public com.mongodb.client.result.UpdateResult updateOne​(com.mongodb.client.ClientSession clientSession,
                                                                org.bson.conversions.Bson filter,
                                                                List<? extends org.bson.conversions.Bson> update,
                                                                com.mongodb.client.model.UpdateOptions updateOptions)
        Specified by:
        updateOne in interface com.mongodb.client.MongoCollection<TDocument>
      • updateMany

        public com.mongodb.client.result.UpdateResult updateMany​(org.bson.conversions.Bson filter,
                                                                 org.bson.conversions.Bson update)
        Specified by:
        updateMany in interface com.mongodb.client.MongoCollection<TDocument>
      • updateMany

        public com.mongodb.client.result.UpdateResult updateMany​(org.bson.conversions.Bson filter,
                                                                 org.bson.conversions.Bson update,
                                                                 com.mongodb.client.model.UpdateOptions updateOptions)
        Specified by:
        updateMany in interface com.mongodb.client.MongoCollection<TDocument>
      • updateMany

        public com.mongodb.client.result.UpdateResult updateMany​(com.mongodb.client.ClientSession clientSession,
                                                                 org.bson.conversions.Bson filter,
                                                                 org.bson.conversions.Bson update)
        Specified by:
        updateMany in interface com.mongodb.client.MongoCollection<TDocument>
      • updateMany

        public com.mongodb.client.result.UpdateResult updateMany​(com.mongodb.client.ClientSession clientSession,
                                                                 org.bson.conversions.Bson filter,
                                                                 org.bson.conversions.Bson update,
                                                                 com.mongodb.client.model.UpdateOptions updateOptions)
        Specified by:
        updateMany in interface com.mongodb.client.MongoCollection<TDocument>
      • updateMany

        public com.mongodb.client.result.UpdateResult updateMany​(org.bson.conversions.Bson filter,
                                                                 List<? extends org.bson.conversions.Bson> update)
        Specified by:
        updateMany in interface com.mongodb.client.MongoCollection<TDocument>
      • updateMany

        public com.mongodb.client.result.UpdateResult updateMany​(org.bson.conversions.Bson filter,
                                                                 List<? extends org.bson.conversions.Bson> update,
                                                                 com.mongodb.client.model.UpdateOptions updateOptions)
        Specified by:
        updateMany in interface com.mongodb.client.MongoCollection<TDocument>
      • updateMany

        public com.mongodb.client.result.UpdateResult updateMany​(com.mongodb.client.ClientSession clientSession,
                                                                 org.bson.conversions.Bson filter,
                                                                 List<? extends org.bson.conversions.Bson> update)
        Specified by:
        updateMany in interface com.mongodb.client.MongoCollection<TDocument>
      • updateMany

        public com.mongodb.client.result.UpdateResult updateMany​(com.mongodb.client.ClientSession clientSession,
                                                                 org.bson.conversions.Bson filter,
                                                                 List<? extends org.bson.conversions.Bson> update,
                                                                 com.mongodb.client.model.UpdateOptions updateOptions)
        Specified by:
        updateMany in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndDelete

        @Nullable
        public TDocument findOneAndDelete​(org.bson.conversions.Bson filter)
        Specified by:
        findOneAndDelete in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndDelete

        @Nullable
        public TDocument findOneAndDelete​(org.bson.conversions.Bson filter,
                                          com.mongodb.client.model.FindOneAndDeleteOptions options)
        Specified by:
        findOneAndDelete in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndDelete

        @Nullable
        public TDocument findOneAndDelete​(com.mongodb.client.ClientSession clientSession,
                                          org.bson.conversions.Bson filter)
        Specified by:
        findOneAndDelete in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndDelete

        @Nullable
        public TDocument findOneAndDelete​(com.mongodb.client.ClientSession clientSession,
                                          org.bson.conversions.Bson filter,
                                          com.mongodb.client.model.FindOneAndDeleteOptions options)
        Specified by:
        findOneAndDelete in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndReplace

        @Nullable
        public TDocument findOneAndReplace​(org.bson.conversions.Bson filter,
                                           TDocument replacement)
        Specified by:
        findOneAndReplace in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndReplace

        @Nullable
        public TDocument findOneAndReplace​(org.bson.conversions.Bson filter,
                                           TDocument replacement,
                                           com.mongodb.client.model.FindOneAndReplaceOptions options)
        Specified by:
        findOneAndReplace in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndReplace

        @Nullable
        public TDocument findOneAndReplace​(com.mongodb.client.ClientSession clientSession,
                                           org.bson.conversions.Bson filter,
                                           TDocument replacement)
        Specified by:
        findOneAndReplace in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndReplace

        @Nullable
        public TDocument findOneAndReplace​(com.mongodb.client.ClientSession clientSession,
                                           org.bson.conversions.Bson filter,
                                           TDocument replacement,
                                           com.mongodb.client.model.FindOneAndReplaceOptions options)
        Specified by:
        findOneAndReplace in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndUpdate

        @Nullable
        public TDocument findOneAndUpdate​(org.bson.conversions.Bson filter,
                                          org.bson.conversions.Bson update)
        Specified by:
        findOneAndUpdate in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndUpdate

        @Nullable
        public TDocument findOneAndUpdate​(org.bson.conversions.Bson filter,
                                          org.bson.conversions.Bson update,
                                          com.mongodb.client.model.FindOneAndUpdateOptions options)
        Specified by:
        findOneAndUpdate in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndUpdate

        @Nullable
        public TDocument findOneAndUpdate​(com.mongodb.client.ClientSession clientSession,
                                          org.bson.conversions.Bson filter,
                                          org.bson.conversions.Bson update)
        Specified by:
        findOneAndUpdate in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndUpdate

        @Nullable
        public TDocument findOneAndUpdate​(com.mongodb.client.ClientSession clientSession,
                                          org.bson.conversions.Bson filter,
                                          org.bson.conversions.Bson update,
                                          com.mongodb.client.model.FindOneAndUpdateOptions options)
        Specified by:
        findOneAndUpdate in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndUpdate

        @Nullable
        public TDocument findOneAndUpdate​(org.bson.conversions.Bson filter,
                                          List<? extends org.bson.conversions.Bson> update)
        Specified by:
        findOneAndUpdate in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndUpdate

        @Nullable
        public TDocument findOneAndUpdate​(org.bson.conversions.Bson filter,
                                          List<? extends org.bson.conversions.Bson> update,
                                          com.mongodb.client.model.FindOneAndUpdateOptions options)
        Specified by:
        findOneAndUpdate in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndUpdate

        @Nullable
        public TDocument findOneAndUpdate​(com.mongodb.client.ClientSession clientSession,
                                          org.bson.conversions.Bson filter,
                                          List<? extends org.bson.conversions.Bson> update)
        Specified by:
        findOneAndUpdate in interface com.mongodb.client.MongoCollection<TDocument>
      • findOneAndUpdate

        @Nullable
        public TDocument findOneAndUpdate​(com.mongodb.client.ClientSession clientSession,
                                          org.bson.conversions.Bson filter,
                                          List<? extends org.bson.conversions.Bson> update,
                                          com.mongodb.client.model.FindOneAndUpdateOptions options)
        Specified by:
        findOneAndUpdate in interface com.mongodb.client.MongoCollection<TDocument>
      • drop

        public void drop()
        Specified by:
        drop in interface com.mongodb.client.MongoCollection<TDocument>
      • drop

        public void drop​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        drop in interface com.mongodb.client.MongoCollection<TDocument>
      • createIndex

        public String createIndex​(org.bson.conversions.Bson keys)
        Specified by:
        createIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • createIndex

        public String createIndex​(org.bson.conversions.Bson keys,
                                  com.mongodb.client.model.IndexOptions indexOptions)
        Specified by:
        createIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • createIndex

        public String createIndex​(com.mongodb.client.ClientSession clientSession,
                                  org.bson.conversions.Bson keys)
        Specified by:
        createIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • createIndex

        public String createIndex​(com.mongodb.client.ClientSession clientSession,
                                  org.bson.conversions.Bson keys,
                                  com.mongodb.client.model.IndexOptions indexOptions)
        Specified by:
        createIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • createIndexes

        public List<String> createIndexes​(List<com.mongodb.client.model.IndexModel> indexes)
        Specified by:
        createIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • createIndexes

        public List<String> createIndexes​(List<com.mongodb.client.model.IndexModel> indexes,
                                          com.mongodb.client.model.CreateIndexOptions createIndexOptions)
        Specified by:
        createIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • createIndexes

        public List<String> createIndexes​(com.mongodb.client.ClientSession clientSession,
                                          List<com.mongodb.client.model.IndexModel> indexes)
        Specified by:
        createIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • createIndexes

        public List<String> createIndexes​(com.mongodb.client.ClientSession clientSession,
                                          List<com.mongodb.client.model.IndexModel> indexes,
                                          com.mongodb.client.model.CreateIndexOptions createIndexOptions)
        Specified by:
        createIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • listIndexes

        public com.mongodb.client.ListIndexesIterable<org.bson.Document> listIndexes()
        Specified by:
        listIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • listIndexes

        public <TResult> com.mongodb.client.ListIndexesIterable<TResult> listIndexes​(Class<TResult> tResultClass)
        Specified by:
        listIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • listIndexes

        public com.mongodb.client.ListIndexesIterable<org.bson.Document> listIndexes​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        listIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • listIndexes

        public <TResult> com.mongodb.client.ListIndexesIterable<TResult> listIndexes​(com.mongodb.client.ClientSession clientSession,
                                                                                     Class<TResult> tResultClass)
        Specified by:
        listIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndex

        public void dropIndex​(String indexName)
        Specified by:
        dropIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndex

        public void dropIndex​(String indexName,
                              com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Specified by:
        dropIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndex

        public void dropIndex​(org.bson.conversions.Bson keys)
        Specified by:
        dropIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndex

        public void dropIndex​(org.bson.conversions.Bson keys,
                              com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Specified by:
        dropIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndex

        public void dropIndex​(com.mongodb.client.ClientSession clientSession,
                              String indexName)
        Specified by:
        dropIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndex

        public void dropIndex​(com.mongodb.client.ClientSession clientSession,
                              org.bson.conversions.Bson keys)
        Specified by:
        dropIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndex

        public void dropIndex​(com.mongodb.client.ClientSession clientSession,
                              String indexName,
                              com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Specified by:
        dropIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndex

        public void dropIndex​(com.mongodb.client.ClientSession clientSession,
                              org.bson.conversions.Bson keys,
                              com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Specified by:
        dropIndex in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndexes

        public void dropIndexes()
        Specified by:
        dropIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndexes

        public void dropIndexes​(com.mongodb.client.ClientSession clientSession)
        Specified by:
        dropIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndexes

        public void dropIndexes​(com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Specified by:
        dropIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • dropIndexes

        public void dropIndexes​(com.mongodb.client.ClientSession clientSession,
                                com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Specified by:
        dropIndexes in interface com.mongodb.client.MongoCollection<TDocument>
      • renameCollection

        public void renameCollection​(com.mongodb.MongoNamespace newCollectionNamespace)
        Specified by:
        renameCollection in interface com.mongodb.client.MongoCollection<TDocument>
      • renameCollection

        public void renameCollection​(com.mongodb.MongoNamespace newCollectionNamespace,
                                     com.mongodb.client.model.RenameCollectionOptions renameCollectionOptions)
        Specified by:
        renameCollection in interface com.mongodb.client.MongoCollection<TDocument>
      • renameCollection

        public void renameCollection​(com.mongodb.client.ClientSession clientSession,
                                     com.mongodb.MongoNamespace newCollectionNamespace)
        Specified by:
        renameCollection in interface com.mongodb.client.MongoCollection<TDocument>
      • renameCollection

        public void renameCollection​(com.mongodb.client.ClientSession clientSession,
                                     com.mongodb.MongoNamespace newCollectionNamespace,
                                     com.mongodb.client.model.RenameCollectionOptions renameCollectionOptions)
        Specified by:
        renameCollection in interface com.mongodb.client.MongoCollection<TDocument>