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 TypeMethodDescriptionlong
Returns the number of documents for the givenQuery
by querying the collection of the given entity class.long
long
Returns the number of documents for the givenQuery
querying the given collection.long
long
long
reactor.core.publisher.Mono<Long>
Returns the number of documents for the givenQuery
by 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 givenQuery
querying 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 givenquery
by callingMongoTemplate.find(Query, Class, String)
andMongoTemplate.remove(Query, Class, String)
, whereas theQuery
forMongoTemplate.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 givenquery
by callingReactiveMongoTemplate.find(Query, Class, String)
andReactiveMongoTemplate.remove(Query, Class, String)
, whereas theQuery
forReactiveMongoTemplate.remove(Query, Class, String)
is constructed out of the find result.protected <T> com.mongodb.client.result.DeleteResult
protected <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.UpdateResult
MongoTemplate.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 long
MongoOperations.exactCount
(Query query, Class<?> entityClass) Returns the number of documents for the givenQuery
by querying the collection of the given entity class.long
MongoOperations.exactCount
(Query query, Class<?> entityClass, String collectionName) default long
MongoOperations.exactCount
(Query query, String collectionName) Returns the number of documents for the givenQuery
querying the given collection.long
MongoTemplate.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 givenQuery
by 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 givenQuery
querying the given collection.reactor.core.publisher.Mono<Long>
ReactiveMongoTemplate.exactCount
(Query query, Class<?> entityClass, String collectionName) void
MongoOperations.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.void
MongoTemplate.executeQuery
(Query query, String collectionName, DocumentCallbackHandler dch) protected void
MongoTemplate.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 aDocumentCallbackHandler
using the provided CursorPreparer.boolean
Determine result of givenQuery
contains at least one element.boolean
Determine result of givenQuery
contains at least one element.boolean
Determine result of givenQuery
contains at least one element.boolean
boolean
boolean
reactor.core.publisher.Mono<Boolean>
Determine result of givenQuery
contains at least one element.reactor.core.publisher.Mono<Boolean>
Determine result of givenQuery
contains at least one element.reactor.core.publisher.Mono<Boolean>
Determine result of givenQuery
contains 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 aFlux
of the specified type.<T> reactor.core.publisher.Flux<T>
Map the results of an ad-hoc query on the specified collection to aFlux
of 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> T
MongoOperations.findAndModify
(Query query, UpdateDefinition update, Class<T> entityClass) <T> T
MongoOperations.findAndModify
(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName) <T> T
MongoOperations.findAndModify
(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass) Triggers findAndModify to apply providedUpdate
on documents matchingCriteria
of givenQuery
takingFindAndModifyOptions
into account.<T> T
MongoOperations.findAndModify
(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass, String collectionName) Triggers findAndModify to apply providedUpdate
on documents matchingCriteria
of givenQuery
takingFindAndModifyOptions
into account.<T> T
MongoTemplate.findAndModify
(Query query, UpdateDefinition update, Class<T> entityClass) <T> T
MongoTemplate.findAndModify
(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName) <T> T
MongoTemplate.findAndModify
(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass) <T> T
MongoTemplate.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 providedUpdate
on documents matchingCriteria
of givenQuery
takingFindAndModifyOptions
into account.<T> reactor.core.publisher.Mono<T>
ReactiveMongoOperations.findAndModify
(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass, String collectionName) Triggers findAndModify to apply providedUpdate
on documents matchingCriteria
of givenQuery
takingFindAndModifyOptions
into 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> T
MongoOperations.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> T
MongoOperations.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> T
MongoTemplate.findAndRemove
(Query query, Class<T> entityClass) <T> T
MongoTemplate.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 matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into 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 matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into account.
NOTE: The replacement entity must not hold an id.default <T> T
MongoOperations.findAndReplace
(Query query, T replacement) Triggers findOneAndReplace to replace a single document matchingCriteria
of givenQuery
with thereplacement
document.default <T> T
MongoOperations.findAndReplace
(Query query, T replacement, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteria
of givenQuery
with thereplacement
document.
Options are defaulted toFindAndReplaceOptions.empty()
.default <T> T
MongoOperations.findAndReplace
(Query query, T replacement, FindAndReplaceOptions options) Triggers findOneAndReplace to replace a single document matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into account.
NOTE: The replacement entity must not hold an id.default <T> T
MongoOperations.findAndReplace
(Query query, T replacement, FindAndReplaceOptions options, Class<T> entityType, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into account.
NOTE: The replacement entity must not hold an id.default <T> T
MongoOperations.findAndReplace
(Query query, T replacement, FindAndReplaceOptions options, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into 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 matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into 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 matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into account.default <T> reactor.core.publisher.Mono<T>
ReactiveMongoOperations.findAndReplace
(Query query, T replacement) Triggers findOneAndReplace to replace a single document matchingCriteria
of givenQuery
with thereplacement
document.default <T> reactor.core.publisher.Mono<T>
ReactiveMongoOperations.findAndReplace
(Query query, T replacement, String collectionName) Triggers findOneAndReplace to replace a single document matchingCriteria
of givenQuery
with thereplacement
document.default <T> reactor.core.publisher.Mono<T>
ReactiveMongoOperations.findAndReplace
(Query query, T replacement, FindAndReplaceOptions options) Triggers findOneAndReplace to replace a single document matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into 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 matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into 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 matchingCriteria
of givenQuery
with thereplacement
document takingFindAndReplaceOptions
into 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 singleMongoCollection
or 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 singleMongoCollection
or 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 singleMongoCollection
or 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 singleMongoCollection
or 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 singleMongoCollection
or 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 singleMongoCollection
or 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> 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> 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> 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.DeleteResult
Remove all documents that match the provided query document criteria from the collection used to store the entityClass.com.mongodb.client.result.DeleteResult
Remove all documents that match the provided query document criteria from the collection used to store the entityClass.com.mongodb.client.result.DeleteResult
Remove all documents from the specified collection that match the provided query document criteria.com.mongodb.client.result.DeleteResult
com.mongodb.client.result.DeleteResult
com.mongodb.client.result.DeleteResult
Add 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.UpdateResult
default <T> com.mongodb.client.result.UpdateResult
default <T> com.mongodb.client.result.UpdateResult
MongoOperations.replace
(Query query, T replacement, ReplaceOptions options) Replace a single document matching theCriteria
of givenQuery
with thereplacement
document takingReplaceOptions
into account.<T> com.mongodb.client.result.UpdateResult
MongoOperations.replace
(Query query, T replacement, ReplaceOptions options, String collectionName) Replace a single document matching theCriteria
of givenQuery
with thereplacement
document takingReplaceOptions
into 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.UpdateResult
MongoTemplate.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 theCriteria
of givenQuery
with thereplacement
document takingReplaceOptions
into 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 theCriteria
of givenQuery
with thereplacement
document takingReplaceOptions
into 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 BulkOperations
BulkOperations.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 ReactiveBulkOperations
ReactiveBulkOperations.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 givenQuery
on the entity collection of the specifiedentityType
backed by a Mongo DBFindIterable
.<T> Stream<T>
Executes the givenQuery
on the entity collection of the specifiedentityType
and 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.UpdateResult
MongoOperations.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.UpdateResult
MongoOperations.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.UpdateResult
MongoOperations.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.UpdateResult
MongoTemplate.updateFirst
(Query query, UpdateDefinition update, Class<?> entityClass) com.mongodb.client.result.UpdateResult
MongoTemplate.updateFirst
(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) com.mongodb.client.result.UpdateResult
MongoTemplate.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 BulkOperations
BulkOperations.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.UpdateResult
MongoOperations.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.UpdateResult
MongoOperations.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.UpdateResult
MongoOperations.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.UpdateResult
MongoTemplate.updateMulti
(Query query, UpdateDefinition update, Class<?> entityClass) com.mongodb.client.result.UpdateResult
MongoTemplate.updateMulti
(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) com.mongodb.client.result.UpdateResult
MongoTemplate.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 BulkOperations
Add 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 BulkOperations
Add 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.UpdateResult
MongoOperations.upsert
(Query query, UpdateDefinition update, Class<?> entityClass) Performs an upsert.com.mongodb.client.result.UpdateResult
MongoOperations.upsert
(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) Performs an upsert.com.mongodb.client.result.UpdateResult
MongoOperations.upsert
(Query query, UpdateDefinition update, String collectionName) Performs an upsert.com.mongodb.client.result.UpdateResult
MongoTemplate.upsert
(Query query, UpdateDefinition update, Class<?> entityClass) com.mongodb.client.result.UpdateResult
MongoTemplate.upsert
(Query query, UpdateDefinition update, Class<?> entityClass, String collectionName) com.mongodb.client.result.UpdateResult
MongoTemplate.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 TypeClassDescriptionclass
CustomQuery
implementation to setup a basic query from some arbitrary JSON query string.class
Query
implementation 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 givenCriteriaDefinition
to the currentQuery
.Query.allowDiskUse
(boolean allowDiskUse) Enables writing to temporary files for aggregation stages and queries.Query.allowSecondaryReads()
Allows querying of a replica.Set theCollation
applying 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 Query
Create an independent copy of the givenQuery
.Query.partialResults()
static Query
Query.query
(CriteriaDefinition criteriaDefinition) Static factory method to create aQuery
using 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 theQuery
instance.Query.with
(OffsetScrollPosition position) Sets the given cursor position on theQuery
instance.Sets the given pagination information on theQuery
instance.Query.with
(ScrollPosition position) Sets the given cursor position on theQuery
instance.Configures the query to use the given hint when being executed.Query.withHint
(org.bson.Document hint) Configures the query to use the givenhint
when being executed.Query.withReadConcern
(com.mongodb.ReadConcern readConcern) Configures the query to use the givenReadConcern
when being executed.Query.withReadPreference
(com.mongodb.ReadPreference readPreference) Configures the query to use the givenReadPreference
when being executed.Methods in org.springframework.data.mongodb.core.query with parameters of type QueryModifier and TypeMethodDescriptionstatic Query
Create an independent copy of the givenQuery
.Adds an actual query to theNearQuery
to restrict the objects considered for the actual near operation.protected boolean
Query.querySettingsEquals
(Query that) Tests whether the settings of the givenQuery
are 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 TypeMethodDescriptionvoid
Deletes all files matching the givenQuery
.void
reactor.core.publisher.Mono<Void>
Deletes all files matching the givenQuery
.reactor.core.publisher.Mono<Void>
com.mongodb.client.gridfs.GridFSFindIterable
Returns all files matching the given query.com.mongodb.client.gridfs.GridFSFindIterable
reactor.core.publisher.Flux<com.mongodb.client.gridfs.model.GridFSFile>
Returns aFlux
emitting 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 aMono
emitting the fristGridFSFile
matching 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.GridFSFile
Returns a singleGridFSFile
matching the given query or null in case no file matches.com.mongodb.client.gridfs.model.GridFSFile
reactor.core.publisher.Mono<com.mongodb.client.gridfs.model.GridFSFile>
Returns aMono
emitting a singleGridFSFile
matching 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 Query
AbstractMongoQuery.createCountQuery
(ConvertingParameterAccessor accessor) Creates aQuery
instance using the givenConvertingParameterAccessor
.protected Query
PartTreeMongoQuery.createCountQuery
(ConvertingParameterAccessor accessor) protected abstract Query
AbstractMongoQuery.createQuery
(ConvertingParameterAccessor accessor) Creates aQuery
instance using the givenParameterAccessor
protected Query
PartTreeMongoQuery.createQuery
(ConvertingParameterAccessor accessor) protected Query
StringBasedAggregation.createQuery
(ConvertingParameterAccessor accessor) protected Query
StringBasedMongoQuery.createQuery
(ConvertingParameterAccessor accessor) static Query
QueryUtils.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 aQuery
instance 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 aQuery
instance using the givenParameterAccessor
protected 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 Query
QueryUtils.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 Query
SpringDataMongodbQuery.createQuery()
protected Query
SpringDataMongodbQuery.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)
.