Interface ReactiveQuerydslPredicateExecutor<T>


public interface ReactiveQuerydslPredicateExecutor<T>
Interface to issue queries using Querydsl Predicate instances.
Intended for usage along with the ReactiveCrudRepository interface to wire in Querydslsupport.
     

  public interface PersonRepository extends ReactiveCrudRepository<Person, String>, ReactiveQuerydslPredicateExecutor<Person> {

  }

  // ...

  personRepository.findOne(QPerson.person.email.eq("t-800@skynet.io"))
      .flatMap(t800 ->
      //....

     
 
IMPORTANT: Please check the module specific documentation whether or not Querydsl is supported.
Since:
2.2
Author:
Mark Paluch, Christoph Strobl
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<Long>
    count(com.querydsl.core.types.Predicate predicate)
    Returns a Mono emitting the number of instances matching the given Predicate.
    reactor.core.publisher.Mono<Boolean>
    exists(com.querydsl.core.types.Predicate predicate)
    Checks whether the data store contains elements that match the given Predicate.
    reactor.core.publisher.Flux<T>
    findAll(com.querydsl.core.types.OrderSpecifier<?>... orders)
    Returns a Flux emitting all entities ordered by the given OrderSpecifiers.
    reactor.core.publisher.Flux<T>
    findAll(com.querydsl.core.types.Predicate predicate)
    Returns a Flux emitting all entities matching the given Predicate.
    reactor.core.publisher.Flux<T>
    findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders)
    Returns a Flux emitting all entities matching the given Predicate applying the given OrderSpecifiers.
    reactor.core.publisher.Flux<T>
    findAll(com.querydsl.core.types.Predicate predicate, Sort sort)
    Returns a Flux emitting all entities matching the given Predicate applying the given Sort.
    <S extends T, R, P extends org.reactivestreams.Publisher<R>>
    P
    findBy(com.querydsl.core.types.Predicate predicate, Function<FluentQuery.ReactiveFluentQuery<S>,P> queryFunction)
    Returns entities matching the given Predicate applying the queryFunction that defines the query and its result type.
    reactor.core.publisher.Mono<T>
    findOne(com.querydsl.core.types.Predicate predicate)
    Returns a Mono emitting the entity matching the given Predicate or Mono.empty() if none was found.
  • Method Details

    • findOne

      reactor.core.publisher.Mono<T> findOne(com.querydsl.core.types.Predicate predicate)
      Returns a Mono emitting the entity matching the given Predicate or Mono.empty() if none was found.
      Parameters:
      predicate - must not be null.
      Returns:
      a Mono emitting a single entity matching the given Predicate or Mono.empty() if none was found.
      Throws:
      IllegalArgumentException - if the required parameter is null.
      IncorrectResultSizeDataAccessException - if the predicate yields more than one result.
    • findAll

      reactor.core.publisher.Flux<T> findAll(com.querydsl.core.types.Predicate predicate)
      Returns a Flux emitting all entities matching the given Predicate. In case no match could be found, Flux emits no items.
      Parameters:
      predicate - must not be null.
      Returns:
      a Flux emitting all entities matching the given Predicate one by one.
      Throws:
      IllegalArgumentException - if the required parameter is null.
    • findAll

      reactor.core.publisher.Flux<T> findAll(com.querydsl.core.types.Predicate predicate, Sort sort)
      Returns a Flux emitting all entities matching the given Predicate applying the given Sort. In case no match could be found, Flux emits no items.
      Parameters:
      predicate - must not be null.
      sort - the Sort specification to sort the results by, may be Sort.unsorted(), must not be null.
      Returns:
      a Flux emitting all entities matching the given Predicate one by one.
      Throws:
      IllegalArgumentException - if one of the required parameters is null.
    • findAll

      reactor.core.publisher.Flux<T> findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders)
      Returns a Flux emitting all entities matching the given Predicate applying the given OrderSpecifiers. In case no match could be found, Flux emits no items.
      Parameters:
      predicate - must not be null.
      orders - the OrderSpecifiers to sort the results by.
      Returns:
      a Flux emitting all entities matching the given Predicate applying the given OrderSpecifiers.
      Throws:
      IllegalArgumentException - if one of the required parameter is null, or contains a null value.
    • findAll

      reactor.core.publisher.Flux<T> findAll(com.querydsl.core.types.OrderSpecifier<?>... orders)
      Returns a Flux emitting all entities ordered by the given OrderSpecifiers.
      Parameters:
      orders - the OrderSpecifiers to sort the results by.
      Returns:
      a Flux emitting all entities ordered by the given OrderSpecifiers.
      Throws:
      IllegalArgumentException - one of the OrderSpecifiers is null.
    • count

      reactor.core.publisher.Mono<Long> count(com.querydsl.core.types.Predicate predicate)
      Returns a Mono emitting the number of instances matching the given Predicate.
      Parameters:
      predicate - the Predicate to count instances for, must not be null.
      Returns:
      a Mono emitting the number of instances matching the Predicate or 0 if none found.
      Throws:
      IllegalArgumentException - if the required parameter is null.
    • exists

      reactor.core.publisher.Mono<Boolean> exists(com.querydsl.core.types.Predicate predicate)
      Checks whether the data store contains elements that match the given Predicate.
      Parameters:
      predicate - the Predicate to use for the existence check, must not be null.
      Returns:
      a Mono emitting true if the data store contains elements that match the given Predicate, false otherwise.
      Throws:
      IllegalArgumentException - if the required parameter is null.
    • findBy

      <S extends T, R, P extends org.reactivestreams.Publisher<R>> P findBy(com.querydsl.core.types.Predicate predicate, Function<FluentQuery.ReactiveFluentQuery<S>,P> queryFunction)
      Returns entities matching the given Predicate applying the queryFunction that defines the query and its result type.

      The query object used with queryFunction is only valid inside the findBy(…) method call. This requires the query function to return a query result and not the FluentQuery object itself to ensure the query is executed inside the findBy(…) method.

      Parameters:
      predicate - must not be null.
      queryFunction - the query function defining projection, sorting, and the result type
      Returns:
      all entities matching the given Predicate.
      Since:
      2.6