接口 QuerydslPredicateService<M,​E>

  • 所有已知实现类:
    CrudBaseService

    public interface QuerydslPredicateService<M,​E>
    • 方法概要

      所有方法 实例方法 抽象方法 默认方法 已过时的方法 
      修饰符和类型 方法 说明
      default long count​(com.querydsl.core.types.Predicate predicate)
      Returns the number of instances matching the given Predicate.
      default <Q extends com.querydsl.core.types.EntityPath<E>>
      long
      count​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function)
      已过时。
      default boolean exists​(com.querydsl.core.types.Predicate predicate)
      Checks whether the data store contains elements that match the given Predicate.
      default <Q extends com.querydsl.core.types.EntityPath<E>>
      boolean
      exists​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function)
      已过时。
      default java.util.stream.Stream<M> findAll​(com.querydsl.core.types.OrderSpecifier<?>... orders)
      Returns all entities ordered by the given OrderSpecifiers.
      default java.util.stream.Stream<M> findAll​(com.querydsl.core.types.Predicate predicate)
      Returns all entities matching the given Predicate.
      default java.util.stream.Stream<M> findAll​(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders)
      Returns all entities matching the given Predicate applying the given OrderSpecifiers.
      default org.springframework.data.domain.Page<M> findAll​(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable)
      Returns a Page of entities matching the given Predicate.
      default java.util.stream.Stream<M> findAll​(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort)
      Returns all entities matching the given Predicate applying the given Sort.
      default <Q extends com.querydsl.core.types.EntityPath<E>>
      java.util.stream.Stream<M>
      findAll​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function)
      已过时。
      default <Q extends com.querydsl.core.types.EntityPath<E>>
      java.util.stream.Stream<M>
      findAll​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function, com.querydsl.core.types.OrderSpecifier<?>... orders)
      已过时。
      default <Q extends com.querydsl.core.types.EntityPath<E>>
      org.springframework.data.domain.Page<M>
      findAll​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function, org.springframework.data.domain.Pageable pageable)
      已过时。
      default <Q extends com.querydsl.core.types.EntityPath<E>>
      java.util.stream.Stream<M>
      findAll​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function, org.springframework.data.domain.Sort sort)
      已过时。
      default <S extends E,​R>
      R
      findBy​(com.querydsl.core.types.Predicate predicate, java.util.function.Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,​R> queryFunction)
      Returns entities matching the given Predicate applying the queryFunction that defines the query and its result type.
      default <S extends E,​R,​Q extends com.querydsl.core.types.EntityPath<E>>
      R
      findBy​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function, java.util.function.Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,​R> queryFunction)
      已过时。
      default java.util.Optional<M> findOne​(com.querydsl.core.types.Predicate predicate)
      Returns a single entity matching the given Predicate or Optional.empty() if none was found.
      default <Q extends com.querydsl.core.types.EntityPath<E>>
      java.util.Optional<M>
      findOne​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function)
      已过时。
      <MAPPER extends EntityMapper<M,​E>>
      MAPPER
      getEntityMapper()  
      default <Q extends com.querydsl.core.types.EntityPath<E>>
      Q
      getQueryEntity()  
      <REPO extends org.springframework.data.querydsl.QuerydslPredicateExecutor<E>>
      REPO
      getRepository()  
    • 方法详细资料

      • getRepository

        <REPO extends org.springframework.data.querydsl.QuerydslPredicateExecutor<E>> REPO getRepository()
      • getEntityMapper

        <MAPPER extends EntityMapper<M,​E>> MAPPER getEntityMapper()
      • getQueryEntity

        default <Q extends com.querydsl.core.types.EntityPath<E>> Q getQueryEntity()
      • findOne

        default java.util.Optional<M> findOne​(com.querydsl.core.types.Predicate predicate)
        Returns a single entity matching the given Predicate or Optional.empty() if none was found.
        参数:
        predicate - must not be null.
        返回:
        a single entity matching the given Predicate or Optional.empty() if none was found.
        抛出:
        org.springframework.dao.IncorrectResultSizeDataAccessException - if the predicate yields more than one result.
      • findOne

        @Deprecated
        default <Q extends com.querydsl.core.types.EntityPath<E>> java.util.Optional<M> findOne​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function)
        已过时。
      • findAll

        default java.util.stream.Stream<M> findAll​(com.querydsl.core.types.Predicate predicate)
        Returns all entities matching the given Predicate. In case no match could be found an empty Iterable is returned.
        参数:
        predicate - must not be null.
        返回:
        all entities matching the given Predicate.
      • findAll

        @Deprecated
        default <Q extends com.querydsl.core.types.EntityPath<E>> java.util.stream.Stream<M> findAll​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function)
        已过时。
      • findAll

        default java.util.stream.Stream<M> findAll​(com.querydsl.core.types.Predicate predicate,
                                                   org.springframework.data.domain.Sort sort)
        Returns all entities matching the given Predicate applying the given Sort. In case no match could be found an empty Iterable is returned.
        参数:
        predicate - must not be null.
        sort - the Sort specification to sort the results by, may be Sort.unsorted(), must not be null.
        返回:
        all entities matching the given Predicate.
        从以下版本开始:
        1.10
      • findAll

        @Deprecated
        default <Q extends com.querydsl.core.types.EntityPath<E>> java.util.stream.Stream<M> findAll​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function,
                                                                                                     org.springframework.data.domain.Sort sort)
        已过时。
      • findAll

        default java.util.stream.Stream<M> findAll​(com.querydsl.core.types.Predicate predicate,
                                                   com.querydsl.core.types.OrderSpecifier<?>... orders)
        Returns all entities matching the given Predicate applying the given OrderSpecifiers. In case no match could be found an empty Iterable is returned.
        参数:
        predicate - must not be null.
        orders - the OrderSpecifiers to sort the results by, must not be null.
        返回:
        all entities matching the given Predicate applying the given OrderSpecifiers.
      • findAll

        @Deprecated
        default <Q extends com.querydsl.core.types.EntityPath<E>> java.util.stream.Stream<M> findAll​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function,
                                                                                                     com.querydsl.core.types.OrderSpecifier<?>... orders)
        已过时。
      • findAll

        default java.util.stream.Stream<M> findAll​(com.querydsl.core.types.OrderSpecifier<?>... orders)
        Returns all entities ordered by the given OrderSpecifiers.
        参数:
        orders - the OrderSpecifiers to sort the results by, must not be null.
        返回:
        all entities ordered by the given OrderSpecifiers.
      • findAll

        default org.springframework.data.domain.Page<M> findAll​(com.querydsl.core.types.Predicate predicate,
                                                                org.springframework.data.domain.Pageable pageable)
        Returns a Page of entities matching the given Predicate. In case no match could be found, an empty Page is returned.
        参数:
        predicate - must not be null.
        pageable - may be Pageable.unpaged(), must not be null.
        返回:
        a Page of entities matching the given Predicate.
      • findAll

        @Deprecated
        default <Q extends com.querydsl.core.types.EntityPath<E>> org.springframework.data.domain.Page<M> findAll​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function,
                                                                                                                  org.springframework.data.domain.Pageable pageable)
        已过时。
      • count

        default long count​(com.querydsl.core.types.Predicate predicate)
        Returns the number of instances matching the given Predicate.
        参数:
        predicate - the Predicate to count instances for, must not be null.
        返回:
        the number of instances matching the Predicate.
      • count

        @Deprecated
        default <Q extends com.querydsl.core.types.EntityPath<E>> long count​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function)
        已过时。
      • exists

        default boolean exists​(com.querydsl.core.types.Predicate predicate)
        Checks whether the data store contains elements that match the given Predicate.
        参数:
        predicate - the Predicate to use for the existence check, must not be null.
        返回:
        true if the data store contains elements that match the given Predicate.
      • exists

        @Deprecated
        default <Q extends com.querydsl.core.types.EntityPath<E>> boolean exists​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function)
        已过时。
      • findBy

        default <S extends E,​R> R findBy​(com.querydsl.core.types.Predicate predicate,
                                               java.util.function.Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,​R> queryFunction)
        Returns entities matching the given Predicate applying the queryFunction that defines the query and its result type.
        参数:
        predicate - must not be null.
        queryFunction - the query function defining projection, sorting, and the result type
        返回:
        all entities matching the given Predicate.
        从以下版本开始:
        2.6
      • findBy

        @Deprecated
        default <S extends E,​R,​Q extends com.querydsl.core.types.EntityPath<E>> R findBy​(java.util.function.Function<Q,​com.querydsl.core.types.Predicate> function,
                                                                                                     java.util.function.Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,​R> queryFunction)
        已过时。