Class ReactiveQuerydslMongoPredicateExecutor<T>
java.lang.Object
org.springframework.data.mongodb.repository.support.ReactiveQuerydslMongoPredicateExecutor<T>
- All Implemented Interfaces:
org.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
public class ReactiveQuerydslMongoPredicateExecutor<T>
extends Object
implements org.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
MongoDB-specific
QuerydslPredicateExecutor
that allows execution Predicate
s in various forms.- Since:
- 2.2
- Author:
- Mark Paluch, Christoph Strobl
-
Constructor Summary
ConstructorDescriptionReactiveQuerydslMongoPredicateExecutor
(MongoEntityInformation<T, ?> entityInformation, ReactiveMongoOperations mongoOperations) Creates a newReactiveQuerydslMongoPredicateExecutor
for the givenMongoEntityInformation
andReactiveMongoOperations
.ReactiveQuerydslMongoPredicateExecutor
(MongoEntityInformation<T, ?> entityInformation, ReactiveMongoOperations mongoOperations, org.springframework.data.querydsl.EntityPathResolver resolver) Creates a newReactiveQuerydslMongoPredicateExecutor
for the givenMongoEntityInformation
,ReactiveMongoOperations
andEntityPathResolver
. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Long>
count
(com.querydsl.core.types.Predicate predicate) reactor.core.publisher.Mono<Boolean>
exists
(com.querydsl.core.types.Predicate predicate) reactor.core.publisher.Flux<T>
findAll
(com.querydsl.core.types.OrderSpecifier<?>... orders) reactor.core.publisher.Flux<T>
findAll
(com.querydsl.core.types.Predicate predicate) reactor.core.publisher.Flux<T>
findAll
(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders) reactor.core.publisher.Flux<T>
findAll
(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort) <S extends T,
R, P extends org.reactivestreams.Publisher<R>>
PfindBy
(com.querydsl.core.types.Predicate predicate, Function<org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery<S>, P> queryFunction) reactor.core.publisher.Mono<T>
findOne
(com.querydsl.core.types.Predicate predicate) protected org.springframework.data.mongodb.repository.support.SpringDataMongodbSerializer
protected static <E> com.querydsl.core.types.dsl.PathBuilder<E>
pathBuilderFor
(com.querydsl.core.types.EntityPath<E> path) protected com.querydsl.core.types.OrderSpecifier<?>
toOrder
(org.springframework.data.domain.Sort.Order order) Transforms a plainSort.Order
into a Querydsl specificOrderSpecifier
.protected List<com.querydsl.core.types.OrderSpecifier<?>>
toOrderSpecifiers
(org.springframework.data.domain.Sort sort) Converts the givenSort
toOrderSpecifier
.protected org.springframework.data.repository.core.EntityInformation<T,
?>
-
Constructor Details
-
ReactiveQuerydslMongoPredicateExecutor
public ReactiveQuerydslMongoPredicateExecutor(MongoEntityInformation<T, ?> entityInformation, ReactiveMongoOperations mongoOperations) Creates a newReactiveQuerydslMongoPredicateExecutor
for the givenMongoEntityInformation
andReactiveMongoOperations
. Uses theSimpleEntityPathResolver
to create anEntityPath
for the given domain class.- Parameters:
entityInformation
- must not be null.mongoOperations
- must not be null.
-
ReactiveQuerydslMongoPredicateExecutor
public ReactiveQuerydslMongoPredicateExecutor(MongoEntityInformation<T, ?> entityInformation, ReactiveMongoOperations mongoOperations, org.springframework.data.querydsl.EntityPathResolver resolver) Creates a newReactiveQuerydslMongoPredicateExecutor
for the givenMongoEntityInformation
,ReactiveMongoOperations
andEntityPathResolver
.- Parameters:
entityInformation
- must not be null.mongoOperations
- must not be null.resolver
- must not be null.
-
-
Method Details
-
findOne
- Specified by:
findOne
in interfaceorg.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
-
findAll
- Specified by:
findAll
in interfaceorg.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
-
findAll
public reactor.core.publisher.Flux<T> findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders) - Specified by:
findAll
in interfaceorg.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
-
findAll
public reactor.core.publisher.Flux<T> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort) - Specified by:
findAll
in interfaceorg.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
-
findAll
- Specified by:
findAll
in interfaceorg.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
-
count
- Specified by:
count
in interfaceorg.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
-
exists
- Specified by:
exists
in interfaceorg.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
-
findBy
public <S extends T,R, P findByP extends org.reactivestreams.Publisher<R>> (com.querydsl.core.types.Predicate predicate, Function<org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery<S>, P> queryFunction) - Specified by:
findBy
in interfaceorg.springframework.data.querydsl.ReactiveQuerydslPredicateExecutor<T>
-
pathBuilderFor
protected static <E> com.querydsl.core.types.dsl.PathBuilder<E> pathBuilderFor(com.querydsl.core.types.EntityPath<E> path) -
typeInformation
-
mongodbSerializer
protected org.springframework.data.mongodb.repository.support.SpringDataMongodbSerializer mongodbSerializer() -
toOrder
protected com.querydsl.core.types.OrderSpecifier<?> toOrder(org.springframework.data.domain.Sort.Order order) Transforms a plainSort.Order
into a Querydsl specificOrderSpecifier
.- Parameters:
order
-- Returns:
-
toOrderSpecifiers
protected List<com.querydsl.core.types.OrderSpecifier<?>> toOrderSpecifiers(org.springframework.data.domain.Sort sort) Converts the givenSort
toOrderSpecifier
.- Parameters:
sort
-- Returns:
-