Uses of Class
org.springframework.data.mongodb.core.query.Query
Packages that use Query
Package
Description
MongoDB core support.
MongoDB specific messaging support for listening to eg.
MongoDB specific query and update support.
Support for MongoDB GridFS feature.
Query derivation mechanism for MongoDB specific repositories.
Support infrastructure for query derivation of MongoDB specific repositories.
-
Uses of Query in org.springframework.data.mongodb.core
Methods in org.springframework.data.mongodb.core with parameters of type QueryModifier and TypeMethodDescriptionlongReturns the number of documents for the givenQueryby querying the collection of the given entity class.longlongReturns the number of documents for the givenQueryquerying the given collection.longlonglongreactor.core.publisher.Mono<Long>Returns the number of documents for the givenQueryby querying the collection of the given entity class.reactor.core.publisher.Mono<Long>reactor.core.publisher.Mono<Long>Returns the number of documents for the givenQueryquerying the given collection.reactor.core.publisher.Mono<Long>reactor.core.publisher.Mono<Long>reactor.core.publisher.Mono<Long>protected <T> List<T>MongoTemplate.doFindAndDelete(String collectionName, Query query, Class<T> entityClass) Retrieve and remove all documents matching the givenqueryby callingMongoTemplate.find(Query, Class, String)andMongoTemplate.remove(Query, Class, String), whereas theQueryforMongoTemplate.remove(Query, Class, String)is constructed out of the find result.protected <T> reactor.core.publisher.Flux<T>ReactiveMongoTemplate.doFindAndDelete(String collectionName, Query query, Class<T> entityClass) Retrieve and remove all documents matching the givenqueryby callingReactiveMongoTemplate.find(Query, Class, String)andReactiveMongoTemplate.remove(Query, Class, String), whereas theQueryforReactiveMongoTemplate.remove(Query, Class, String)is constructed out of the find result.protected <T> com.mongodb.client.result.DeleteResultprotected <T> reactor.core.publisher.Mono<com.mongodb.client.result.DeleteResult>protected <T> Stream<T>MongoTemplate.doStream(Query query, Class<?> entityType, String collectionName, Class<T> returnType) protected com.mongodb.client.result.UpdateResultMongoTemplate.doUpdate(String collectionName, Query query, UpdateDefinition update, Class<?> entityClass, boolean upsert, boolean multi) protected reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.doUpdate(String collectionName, Query query, UpdateDefinition update, Class<?> entityClass, boolean upsert, boolean multi) default longMongoOperations.exactCount(Query query, Class<?> entityClass) Returns the number of documents for the givenQueryby querying the collection of the given entity class.longMongoOperations.exactCount(Query query, Class<?> entityClass, String collectionName) default longMongoOperations.exactCount(Query query, String collectionName) Returns the number of documents for the givenQueryquerying the given collection.longMongoTemplate.exactCount(Query query, Class<?> entityClass, String collectionName) default reactor.core.publisher.Mono<Long>ReactiveMongoOperations.exactCount(Query query, Class<?> entityClass) Returns the number of documents for the givenQueryby querying the collection of the given entity class.reactor.core.publisher.Mono<Long>ReactiveMongoOperations.exactCount(Query query, Class<?> entityClass, String collectionName) default reactor.core.publisher.Mono<Long>ReactiveMongoOperations.exactCount(Query query, String collectionName) Returns the number of documents for the givenQueryquerying the given collection.reactor.core.publisher.Mono<Long>ReactiveMongoTemplate.exactCount(Query query, Class<?> entityClass, String collectionName) voidMongoOperations.executeQuery(Query query, String collectionName, DocumentCallbackHandler dch) Execute a MongoDB query and iterate over the query results on a per-document basis with a DocumentCallbackHandler.voidMongoTemplate.executeQuery(Query query, String collectionName, DocumentCallbackHandler dch) protected voidMongoTemplate.executeQuery(Query query, String collectionName, DocumentCallbackHandler documentCallbackHandler, CursorPreparer preparer) Execute a MongoDB query and iterate over the query results on a per-document basis with aDocumentCallbackHandlerusing the provided CursorPreparer.booleanDetermine result of givenQuerycontains at least one element.booleanDetermine result of givenQuerycontains at least one element.booleanDetermine result of givenQuerycontains at least one element.booleanbooleanbooleanreactor.core.publisher.Mono<Boolean>Determine result of givenQuerycontains at least one element.reactor.core.publisher.Mono<Boolean>Determine result of givenQuerycontains at least one element.reactor.core.publisher.Mono<Boolean>Determine result of givenQuerycontains at least one element.reactor.core.publisher.Mono<Boolean>reactor.core.publisher.Mono<Boolean>reactor.core.publisher.Mono<Boolean><T> List<T>Map the results of an ad-hoc query on the collection for the entity class to a List of the specified type.<T> List<T>Map the results of an ad-hoc query on the specified collection to a List of the specified type.<T> List<T><T> List<T><T> reactor.core.publisher.Flux<T>Map the results of an ad-hoc query on the collection for the entity class to aFluxof the specified type.<T> reactor.core.publisher.Flux<T>Map the results of an ad-hoc query on the specified collection to aFluxof the specified type.<T> reactor.core.publisher.Flux<T><T> reactor.core.publisher.Flux<T><T> List<T>MongoOperations.findAllAndRemove(Query query, Class<T> entityClass) Returns and removes all documents matching the given query form the collection used to store the entityClass.<T> List<T>MongoOperations.findAllAndRemove(Query query, Class<T> entityClass, String collectionName) Returns and removes all documents that match the provided query document criteria from the collection used to store the entityClass.<T> List<T>MongoOperations.findAllAndRemove(Query query, String collectionName) Returns and removes all documents form the specified collection that match the provided query.<T> List<T>MongoTemplate.findAllAndRemove(Query query, Class<T> entityClass) <T> List<T>MongoTemplate.findAllAndRemove(Query query, Class<T> entityClass, String collectionName) <T> List<T>MongoTemplate.findAllAndRemove(Query query, String collectionName) <T> reactor.core.publisher.Flux<T>ReactiveMongoOperations.findAllAndRemove(Query query, Class<T> entityClass) Returns and removes all documents matching the given query form the collection used to store the entityClass.<T> reactor.core.publisher.Flux<T>ReactiveMongoOperations.findAllAndRemove(Query query, Class<T> entityClass, String collectionName) Returns and removes all documents that match the provided query document criteria from the collection used to store the entityClass.<T> reactor.core.publisher.Flux<T>ReactiveMongoOperations.findAllAndRemove(Query query, String collectionName) Returns and removes all documents form the specified collection that match the provided query.<T> reactor.core.publisher.Flux<T>ReactiveMongoTemplate.findAllAndRemove(Query query, Class<T> entityClass) <T> reactor.core.publisher.Flux<T>ReactiveMongoTemplate.findAllAndRemove(Query query, Class<T> entityClass, String collectionName) <T> reactor.core.publisher.Flux<T>ReactiveMongoTemplate.findAllAndRemove(Query query, String collectionName) <T> TMongoOperations.findAndModify(Query query, UpdateDefinition update, Class<T> entityClass) <T> TMongoOperations.findAndModify(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName) <T> TMongoOperations.findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass) Triggers findAndModify to apply providedUpdateon documents matchingCriteriaof givenQuerytakingFindAndModifyOptionsinto account.<T> TMongoOperations.findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass, String collectionName) Triggers findAndModify to apply providedUpdateon documents matchingCriteriaof givenQuerytakingFindAndModifyOptionsinto account.<T> TMongoTemplate.findAndModify(Query query, UpdateDefinition update, Class<T> entityClass) <T> TMongoTemplate.findAndModify(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName) <T> TMongoTemplate.findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass) <T> TMongoTemplate.findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass, String collectionName) <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndModify(Query query, UpdateDefinition update, Class<T> entityClass) <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndModify(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName) <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass) Triggers findAndModify to apply providedUpdateon documents matchingCriteriaof givenQuerytakingFindAndModifyOptionsinto account.<T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass, String collectionName) Triggers findAndModify to apply providedUpdateon documents matchingCriteriaof givenQuerytakingFindAndModifyOptionsinto account.<T> reactor.core.publisher.Mono<T>ReactiveMongoTemplate.findAndModify(Query query, UpdateDefinition update, Class<T> entityClass) <T> reactor.core.publisher.Mono<T>ReactiveMongoTemplate.findAndModify(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName) <T> reactor.core.publisher.Mono<T>ReactiveMongoTemplate.findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass) <T> reactor.core.publisher.Mono<T>ReactiveMongoTemplate.findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass, String collectionName) <T> TMongoOperations.findAndRemove(Query query, Class<T> entityClass) Map the results of an ad-hoc query on the collection for the entity type to a single instance of an object of the specified type.<T> TMongoOperations.findAndRemove(Query query, Class<T> entityClass, String collectionName) Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified type.<T> TMongoTemplate.findAndRemove(Query query, Class<T> entityClass) <T> TMongoTemplate.findAndRemove(Query query, Class<T> entityClass, String collectionName) <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndRemove(Query query, Class<T> entityClass) Map the results of an ad-hoc query on the collection for the entity type to a single instance of an object of the specified type.<T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndRemove(Query query, Class<T> entityClass, String collectionName) Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified type.<T> reactor.core.publisher.Mono<T>ReactiveMongoTemplate.findAndRemove(Query query, Class<T> entityClass) <T> reactor.core.publisher.Mono<T>ReactiveMongoTemplate.findAndRemove(Query query, Class<T> entityClass, String collectionName) default <S,T> T MongoOperations.findAndReplace(Query query, S replacement, FindAndReplaceOptions options, Class<S> entityType, Class<T> resultType) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.
NOTE: The replacement entity must not hold an id.<S,T> T MongoOperations.findAndReplace(Query query, S replacement, FindAndReplaceOptions options, Class<S> entityType, String collectionName, Class<T> resultType) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.
NOTE: The replacement entity must not hold an id.default <T> TMongoOperations.findAndReplace(Query query, T replacement) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument.default <T> TMongoOperations.findAndReplace(Query query, T replacement, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument.
Options are defaulted toFindAndReplaceOptions.empty().default <T> TMongoOperations.findAndReplace(Query query, T replacement, FindAndReplaceOptions options) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.
NOTE: The replacement entity must not hold an id.default <T> TMongoOperations.findAndReplace(Query query, T replacement, FindAndReplaceOptions options, Class<T> entityType, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.
NOTE: The replacement entity must not hold an id.default <T> TMongoOperations.findAndReplace(Query query, T replacement, FindAndReplaceOptions options, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.
NOTE: The replacement entity must not hold an id.<S,T> T MongoTemplate.findAndReplace(Query query, S replacement, FindAndReplaceOptions options, Class<S> entityType, String collectionName, Class<T> resultType) default <S,T> reactor.core.publisher.Mono<T> ReactiveMongoOperations.findAndReplace(Query query, S replacement, FindAndReplaceOptions options, Class<S> entityType, Class<T> resultType) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.<S,T> reactor.core.publisher.Mono<T> ReactiveMongoOperations.findAndReplace(Query query, S replacement, FindAndReplaceOptions options, Class<S> entityType, String collectionName, Class<T> resultType) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.default <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndReplace(Query query, T replacement) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument.default <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndReplace(Query query, T replacement, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument.default <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndReplace(Query query, T replacement, FindAndReplaceOptions options) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.default <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndReplace(Query query, T replacement, FindAndReplaceOptions options, Class<T> entityType, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.default <T> reactor.core.publisher.Mono<T>ReactiveMongoOperations.findAndReplace(Query query, T replacement, FindAndReplaceOptions options, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteriaof givenQuerywith thereplacementdocument takingFindAndReplaceOptionsinto account.<S,T> reactor.core.publisher.Mono<T> ReactiveMongoTemplate.findAndReplace(Query query, S replacement, FindAndReplaceOptions options, Class<S> entityType, String collectionName, Class<T> resultType) <T> List<T>MongoOperations.findDistinct(Query query, String field, Class<?> entityClass, Class<T> resultClass) Finds the distinct values for a specified field across a singleMongoCollectionor view and returns the results in aList.<T> List<T>MongoOperations.findDistinct(Query query, String field, String collectionName, Class<?> entityClass, Class<T> resultClass) Finds the distinct values for a specified field across a singleMongoCollectionor view and returns the results in aList.default <T> List<T>MongoOperations.findDistinct(Query query, String field, String collection, Class<T> resultClass) Finds the distinct values for a specified field across a singleMongoCollectionor view and returns the results in aList.<T> List<T>MongoTemplate.findDistinct(Query query, String field, Class<?> entityClass, Class<T> resultClass) <T> List<T>MongoTemplate.findDistinct(Query query, String field, String collectionName, Class<?> entityClass, Class<T> resultClass) <T> reactor.core.publisher.Flux<T>ReactiveMongoOperations.findDistinct(Query query, String field, Class<?> entityClass, Class<T> resultClass) Finds the distinct values for a specified field across a singleMongoCollectionor view and returns the results in aFlux.<T> reactor.core.publisher.Flux<T>ReactiveMongoOperations.findDistinct(Query query, String field, String collectionName, Class<?> entityClass, Class<T> resultClass) Finds the distinct values for a specified field across a singleMongoCollectionor view and returns the results in aFlux.default <T> reactor.core.publisher.Flux<T>ReactiveMongoOperations.findDistinct(Query query, String field, String collection, Class<T> resultClass) Finds the distinct values for a specified field across a singleMongoCollectionor view and returns the results in aFlux.<T> reactor.core.publisher.Flux<T>ReactiveMongoTemplate.findDistinct(Query query, String field, Class<?> entityClass, Class<T> resultClass) <T> reactor.core.publisher.Flux<T>ReactiveMongoTemplate.findDistinct(Query query, String field, String collectionName, Class<?> entityClass, Class<T> resultClass) <T> TMap the results of an ad-hoc query on the collection for the entity class to a single instance of an object of the specified type.<T> TMap the results of an ad-hoc query on the specified collection to a single instance of an object of the specified type.<T> T<T> T<T> reactor.core.publisher.Mono<T>Map the results of an ad-hoc query on the collection for the entity class to a single instance of an object of the specified type.<T> reactor.core.publisher.Mono<T>Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified type.<T> reactor.core.publisher.Mono<T><T> reactor.core.publisher.Mono<T><T> MapReduceResults<T>MongoOperations.mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction, Class<T> entityClass) Deprecated.<T> MapReduceResults<T>MongoOperations.mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction, MapReduceOptions mapReduceOptions, Class<T> entityClass) Deprecated.since 3.4 in favor ofMongoOperations.aggregate(TypedAggregation, Class).<T> List<T>MongoTemplate.mapReduce(Query query, Class<?> domainType, String inputCollectionName, String mapFunction, String reduceFunction, MapReduceOptions mapReduceOptions, Class<T> resultType) Deprecated.since 3.4 in favor ofMongoTemplate.aggregate(TypedAggregation, Class).<T> MapReduceResults<T>MongoTemplate.mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction, Class<T> entityClass) <T> MapReduceResults<T>MongoTemplate.mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction, MapReduceOptions mapReduceOptions, Class<T> entityClass) <T> reactor.core.publisher.Flux<T>ReactiveMongoOperations.mapReduce(Query filterQuery, Class<?> domainType, Class<T> resultType, String mapFunction, String reduceFunction, MapReduceOptions options) Deprecated.since 3.4 in favor ofReactiveMongoOperations.aggregate(TypedAggregation, Class).<T> reactor.core.publisher.Flux<T>ReactiveMongoOperations.mapReduce(Query filterQuery, Class<?> domainType, String inputCollectionName, Class<T> resultType, String mapFunction, String reduceFunction, MapReduceOptions options) Deprecated.since 3.4 in favor ofReactiveMongoOperations.aggregate(TypedAggregation, Class).<T> reactor.core.publisher.Flux<T>ReactiveMongoTemplate.mapReduce(Query filterQuery, Class<?> domainType, Class<T> resultType, String mapFunction, String reduceFunction, MapReduceOptions options) <T> reactor.core.publisher.Flux<T>ReactiveMongoTemplate.mapReduce(Query filterQuery, Class<?> domainType, String inputCollectionName, Class<T> resultType, String mapFunction, String reduceFunction, MapReduceOptions options) Set the filter query to be used.Set the filter query to be used.Set the filter query to be used.Define the query filtering elements.Filter documents by given query.Set the filter query to be used.Set the filter query to be used.Set the filter query to be used.Define the query filtering elements.Filter documents by given query.Add a single remove operation to the bulk operation.com.mongodb.client.result.DeleteResultRemove all documents that match the provided query document criteria from the collection used to store the entityClass.com.mongodb.client.result.DeleteResultRemove all documents that match the provided query document criteria from the collection used to store the entityClass.com.mongodb.client.result.DeleteResultRemove all documents from the specified collection that match the provided query document criteria.com.mongodb.client.result.DeleteResultcom.mongodb.client.result.DeleteResultcom.mongodb.client.result.DeleteResultAdd a single remove operation to the bulk operation.reactor.core.publisher.Mono<com.mongodb.client.result.DeleteResult>Remove all documents that match the provided query document criteria from the collection used to store the entityClass.reactor.core.publisher.Mono<com.mongodb.client.result.DeleteResult>Remove all documents that match the provided query document criteria from the collection used to store the entityClass.reactor.core.publisher.Mono<com.mongodb.client.result.DeleteResult>Remove all documents from the specified collection that match the provided query document criteria.reactor.core.publisher.Mono<com.mongodb.client.result.DeleteResult>reactor.core.publisher.Mono<com.mongodb.client.result.DeleteResult>reactor.core.publisher.Mono<com.mongodb.client.result.DeleteResult>default <T> com.mongodb.client.result.UpdateResultdefault <T> com.mongodb.client.result.UpdateResultdefault <T> com.mongodb.client.result.UpdateResultMongoOperations.replace(Query query, T replacement, ReplaceOptions options) Replace a single document matching theCriteriaof givenQuerywith thereplacementdocument takingReplaceOptionsinto account.<T> com.mongodb.client.result.UpdateResultMongoOperations.replace(Query query, T replacement, ReplaceOptions options, String collectionName) Replace a single document matching theCriteriaof givenQuerywith thereplacementdocument takingReplaceOptionsinto account.protected <S,T> com.mongodb.client.result.UpdateResult MongoTemplate.replace(Query query, Class<S> entityType, T replacement, ReplaceOptions options, String collectionName) <T> com.mongodb.client.result.UpdateResultMongoTemplate.replace(Query query, T replacement, ReplaceOptions options, String collectionName) default <T> reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>default <T> reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>default <T> reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.replace(Query query, T replacement, ReplaceOptions options) Replace a single document matching theCriteriaof givenQuerywith thereplacementdocument takingReplaceOptionsinto account.<T> reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.replace(Query query, T replacement, ReplaceOptions options, String collectionName) Replace a single document matching theCriteriaof givenQuerywith thereplacementdocument takingReplaceOptionsinto account.protected <S,T> reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult> ReactiveMongoTemplate.replace(Query query, Class<S> entityType, T replacement, ReplaceOptions options, String collectionName) <T> reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.replace(Query query, T replacement, ReplaceOptions options, String collectionName) default BulkOperationsBulkOperations.replaceOne(Query query, Object replacement) Add a single replace operation to the bulk operation.BulkOperations.replaceOne(Query query, Object replacement, FindAndReplaceOptions options) Add a single replace operation to the bulk operation.default ReactiveBulkOperationsReactiveBulkOperations.replaceOne(Query query, Object replacement) Add a single replace operation to the bulk operation.ReactiveBulkOperations.replaceOne(Query query, Object replacement, FindAndReplaceOptions options) Add a single replace operation to the bulk operation.<T> Window<T>Query for a window of objects of type T from the specified collection.<T> Window<T>Query for a window of objects of type T from the specified collection.<T> Window<T><T> Window<T><T> reactor.core.publisher.Mono<Window<T>>Query for a scroll of objects of type T from the specified collection.<T> reactor.core.publisher.Mono<Window<T>>Query for a window of objects of type T from the specified collection.<T> reactor.core.publisher.Mono<Window<T>><T> reactor.core.publisher.Mono<Window<T>><T> Stream<T>Executes the givenQueryon the entity collection of the specifiedentityTypebacked by a Mongo DBFindIterable.<T> Stream<T>Executes the givenQueryon the entity collection of the specifiedentityTypeand collection backed by a Mongo DBFindIterable.<T> Stream<T><T> Stream<T><T> reactor.core.publisher.Flux<T>Map the results of an ad-hoc query on the collection for the entity class to a stream of objects of the specified type.<T> reactor.core.publisher.Flux<T>Map the results of an ad-hoc query on the collection for the entity class to a stream of objects of the specified type.<T> reactor.core.publisher.Flux<T><T> reactor.core.publisher.Flux<T>com.mongodb.client.result.UpdateResultMongoOperations.updateFirst(Query query, UpdateDefinition update, Class<?> entityClass) Updates the first object that is found in the collection of the entity class that matches the query document with the provided update document.com.mongodb.client.result.UpdateResultMongoOperations.updateFirst(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) Updates the first object that is found in the specified collection that matches the query document criteria with the provided updated document.com.mongodb.client.result.UpdateResultMongoOperations.updateFirst(Query query, UpdateDefinition update, String collectionName) Updates the first object that is found in the specified collection that matches the query document criteria with the provided updated document.com.mongodb.client.result.UpdateResultMongoTemplate.updateFirst(Query query, UpdateDefinition update, Class<?> entityClass) com.mongodb.client.result.UpdateResultMongoTemplate.updateFirst(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) com.mongodb.client.result.UpdateResultMongoTemplate.updateFirst(Query query, UpdateDefinition update, String collectionName) reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.updateFirst(Query query, UpdateDefinition update, Class<?> entityClass) Updates the first object that is found in the collection of the entity class that matches the query document with the provided update document.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.updateFirst(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) Updates the first object that is found in the specified collection that matches the query document criteria with the provided updated document.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.updateFirst(Query query, UpdateDefinition update, String collectionName) Updates the first object that is found in the specified collection that matches the query document criteria with the provided updated document.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.updateFirst(Query query, UpdateDefinition update, Class<?> entityClass) reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.updateFirst(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.updateFirst(Query query, UpdateDefinition update, String collectionName) default BulkOperationsBulkOperations.updateMulti(Query query, Update update) Add a single update to the bulk operation.BulkOperations.updateMulti(Query query, UpdateDefinition update) Add a single update to the bulk operation.com.mongodb.client.result.UpdateResultMongoOperations.updateMulti(Query query, UpdateDefinition update, Class<?> entityClass) Updates all objects that are found in the collection for the entity class that matches the query document criteria with the provided updated document.com.mongodb.client.result.UpdateResultMongoOperations.updateMulti(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) Updates all objects that are found in the collection for the entity class that matches the query document criteria with the provided updated document.com.mongodb.client.result.UpdateResultMongoOperations.updateMulti(Query query, UpdateDefinition update, String collectionName) Updates all objects that are found in the specified collection that matches the query document criteria with the provided updated document.com.mongodb.client.result.UpdateResultMongoTemplate.updateMulti(Query query, UpdateDefinition update, Class<?> entityClass) com.mongodb.client.result.UpdateResultMongoTemplate.updateMulti(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) com.mongodb.client.result.UpdateResultMongoTemplate.updateMulti(Query query, UpdateDefinition update, String collectionName) ReactiveBulkOperations.updateMulti(Query query, UpdateDefinition update) Add a single update to the bulk operation.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.updateMulti(Query query, UpdateDefinition update, Class<?> entityClass) Updates all objects that are found in the collection for the entity class that matches the query document criteria with the provided updated document.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.updateMulti(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) Updates all objects that are found in the collection for the entity class that matches the query document criteria with the provided updated document.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.updateMulti(Query query, UpdateDefinition update, String collectionName) Updates all objects that are found in the specified collection that matches the query document criteria with the provided updated document.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.updateMulti(Query query, UpdateDefinition update, Class<?> entityClass) reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.updateMulti(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.updateMulti(Query query, UpdateDefinition update, String collectionName) default BulkOperationsAdd a single update to the bulk operation.BulkOperations.updateOne(Query query, UpdateDefinition update) Add a single update to the bulk operation.ReactiveBulkOperations.updateOne(Query query, UpdateDefinition update) Add a single update to the bulk operation.default BulkOperationsAdd a single upsert to the bulk operation.BulkOperations.upsert(Query query, UpdateDefinition update) Add a single upsert to the bulk operation.com.mongodb.client.result.UpdateResultMongoOperations.upsert(Query query, UpdateDefinition update, Class<?> entityClass) Performs an upsert.com.mongodb.client.result.UpdateResultMongoOperations.upsert(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) Performs an upsert.com.mongodb.client.result.UpdateResultMongoOperations.upsert(Query query, UpdateDefinition update, String collectionName) Performs an upsert.com.mongodb.client.result.UpdateResultMongoTemplate.upsert(Query query, UpdateDefinition update, Class<?> entityClass) com.mongodb.client.result.UpdateResultMongoTemplate.upsert(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) com.mongodb.client.result.UpdateResultMongoTemplate.upsert(Query query, UpdateDefinition update, String collectionName) ReactiveBulkOperations.upsert(Query query, UpdateDefinition update) Add a single upsert to the bulk operation.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.upsert(Query query, UpdateDefinition update, Class<?> entityClass) Performs an upsert.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.upsert(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) Performs an upsert.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoOperations.upsert(Query query, UpdateDefinition update, String collectionName) Performs an upsert.reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.upsert(Query query, UpdateDefinition update, Class<?> entityClass) reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.upsert(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) reactor.core.publisher.Mono<com.mongodb.client.result.UpdateResult>ReactiveMongoTemplate.upsert(Query query, UpdateDefinition update, String collectionName) Method parameters in org.springframework.data.mongodb.core with type arguments of type QueryModifier and TypeMethodDescriptionAdd a list of remove operations to the bulk operation.Add a list of remove operations to the bulk operation.BulkOperations.updateMulti(List<Pair<Query, UpdateDefinition>> updates) Add a list of updates to the bulk operation.BulkOperations.updateOne(List<Pair<Query, UpdateDefinition>> updates) Add a list of updates to the bulk operation.Add a list of upserts to the bulk operation. -
Uses of Query in org.springframework.data.mongodb.core.messaging
Methods in org.springframework.data.mongodb.core.messaging that return types with arguments of type QueryMethods in org.springframework.data.mongodb.core.messaging with parameters of type Query -
Uses of Query in org.springframework.data.mongodb.core.query
Subclasses of Query in org.springframework.data.mongodb.core.queryModifier and TypeClassDescriptionclassCustomQueryimplementation to setup a basic query from some arbitrary JSON query string.classQueryimplementation to be used to for performing full text searches.Methods in org.springframework.data.mongodb.core.query that return QueryModifier and TypeMethodDescriptionBasicQuery.addCriteria(CriteriaDefinition criteria) Query.addCriteria(CriteriaDefinition criteriaDefinition) Adds the givenCriteriaDefinitionto the currentQuery.Query.allowDiskUse(boolean allowDiskUse) Enables writing to temporary files for aggregation stages and queries.Query.allowSecondaryReads()Allows querying of a replica.Set theCollationapplying language-specific rules for string comparison.Add a comment to the query that is propagated to the profile log.Query.cursorBatchSize(int batchSize) Set the number of documents to return in each response batch.Query.exhaust()Query.limit(int limit) Limit the number of returned documents tolimit.Limit the number of returned documents toLimit.Query.maxTimeMsec(long maxTimeMsec) Query.noCursorTimeout()static QueryCreate an independent copy of the givenQuery.Query.partialResults()static QueryQuery.query(CriteriaDefinition criteriaDefinition) Static factory method to create aQueryusing the providedCriteriaDefinition.Restricts the query to only return documents instances that are exactly of the given types.Query.skip(long skip) Set number of documents to skip before returning results.Query.with(KeysetScrollPosition position) Sets the given cursor position on theQueryinstance.Query.with(OffsetScrollPosition position) Sets the given cursor position on theQueryinstance.Sets the given pagination information on theQueryinstance.Query.with(ScrollPosition position) Sets the given cursor position on theQueryinstance.Configures the query to use the given hint when being executed.Query.withHint(org.bson.Document hint) Configures the query to use the givenhintwhen being executed.Query.withReadConcern(com.mongodb.ReadConcern readConcern) Configures the query to use the givenReadConcernwhen being executed.Query.withReadPreference(com.mongodb.ReadPreference readPreference) Configures the query to use the givenReadPreferencewhen being executed.Methods in org.springframework.data.mongodb.core.query with parameters of type QueryModifier and TypeMethodDescriptionstatic QueryCreate an independent copy of the givenQuery.Adds an actual query to theNearQueryto restrict the objects considered for the actual near operation.protected booleanQuery.querySettingsEquals(Query that) Tests whether the settings of the givenQueryare equal to this query. -
Uses of Query in org.springframework.data.mongodb.gridfs
Methods in org.springframework.data.mongodb.gridfs with parameters of type QueryModifier and TypeMethodDescriptionvoidDeletes all files matching the givenQuery.voidreactor.core.publisher.Mono<Void>Deletes all files matching the givenQuery.reactor.core.publisher.Mono<Void>com.mongodb.client.gridfs.GridFSFindIterableReturns all files matching the given query.com.mongodb.client.gridfs.GridFSFindIterablereactor.core.publisher.Flux<com.mongodb.client.gridfs.model.GridFSFile>Returns aFluxemitting all files matching the given query.reactor.core.publisher.Flux<com.mongodb.client.gridfs.model.GridFSFile>reactor.core.publisher.Mono<com.mongodb.client.gridfs.model.GridFSFile>Returns aMonoemitting the fristGridFSFilematching the given query orMono.empty()in case no file matches.reactor.core.publisher.Mono<com.mongodb.client.gridfs.model.GridFSFile>com.mongodb.client.gridfs.model.GridFSFileReturns a singleGridFSFilematching the given query or null in case no file matches.com.mongodb.client.gridfs.model.GridFSFilereactor.core.publisher.Mono<com.mongodb.client.gridfs.model.GridFSFile>Returns aMonoemitting a singleGridFSFilematching the given query orMono.empty()in case no file matches.reactor.core.publisher.Mono<com.mongodb.client.gridfs.model.GridFSFile> -
Uses of Query in org.springframework.data.mongodb.repository.query
Methods in org.springframework.data.mongodb.repository.query that return QueryModifier and TypeMethodDescriptionprotected QueryAbstractMongoQuery.createCountQuery(ConvertingParameterAccessor accessor) Creates aQueryinstance using the givenConvertingParameterAccessor.protected QueryPartTreeMongoQuery.createCountQuery(ConvertingParameterAccessor accessor) protected abstract QueryAbstractMongoQuery.createQuery(ConvertingParameterAccessor accessor) Creates aQueryinstance using the givenParameterAccessorprotected QueryPartTreeMongoQuery.createQuery(ConvertingParameterAccessor accessor) protected QueryStringBasedAggregation.createQuery(ConvertingParameterAccessor accessor) protected QueryStringBasedMongoQuery.createQuery(ConvertingParameterAccessor accessor) static QueryQueryUtils.decorateSort(Query query, org.bson.Document defaultSort) Methods in org.springframework.data.mongodb.repository.query that return types with arguments of type QueryModifier and TypeMethodDescriptionprotected reactor.core.publisher.Mono<Query>AbstractReactiveMongoQuery.createCountQuery(ConvertingParameterAccessor accessor) Creates aQueryinstance using the givenConvertingParameterAccessor.protected reactor.core.publisher.Mono<Query>ReactivePartTreeMongoQuery.createCountQuery(ConvertingParameterAccessor accessor) protected abstract reactor.core.publisher.Mono<Query>AbstractReactiveMongoQuery.createQuery(ConvertingParameterAccessor accessor) Creates aQueryinstance using the givenParameterAccessorprotected reactor.core.publisher.Mono<Query>ReactivePartTreeMongoQuery.createQuery(ConvertingParameterAccessor accessor) protected reactor.core.publisher.Mono<Query>ReactiveStringBasedAggregation.createQuery(ConvertingParameterAccessor accessor) protected reactor.core.publisher.Mono<Query>ReactiveStringBasedMongoQuery.createQuery(ConvertingParameterAccessor accessor) Methods in org.springframework.data.mongodb.repository.query with parameters of type QueryModifier and TypeMethodDescriptionstatic QueryQueryUtils.decorateSort(Query query, org.bson.Document defaultSort) Method parameters in org.springframework.data.mongodb.repository.query with type arguments of type QueryModifier and TypeMethodDescriptionstatic Class<?>QueryUtils.queryProxyType(Class<? extends Query> baseType, ClassLoader classLoader) -
Uses of Query in org.springframework.data.mongodb.repository.support
Methods in org.springframework.data.mongodb.repository.support that return QueryModifier and TypeMethodDescriptionprotected QuerySpringDataMongodbQuery.createQuery()protected QuerySpringDataMongodbQuery.createQuery(com.querydsl.core.types.Predicate filter, com.querydsl.core.types.Expression<?> projection, com.querydsl.core.QueryModifiers modifiers, List<com.querydsl.core.types.OrderSpecifier<?>> orderBy)
MongoOperations.aggregate(TypedAggregation, Class).