接口 QuerydslPredicateService<M,E>
-
- 所有已知实现类:
CrudBaseService
public interface QuerydslPredicateService<M,E>
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 已过时的方法 修饰符和类型 方法 说明 default longcount(com.querydsl.core.types.Predicate predicate)Returns the number of instances matching the givenPredicate.default <Q extends com.querydsl.core.types.EntityPath<E>>
longcount(java.util.function.Function<Q,com.querydsl.core.types.Predicate> function)已过时。default booleanexists(com.querydsl.core.types.Predicate predicate)Checks whether the data store contains elements that match the givenPredicate.default <Q extends com.querydsl.core.types.EntityPath<E>>
booleanexists(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 givenOrderSpecifiers.default java.util.stream.Stream<M>findAll(com.querydsl.core.types.Predicate predicate)Returns all entities matching the givenPredicate.default java.util.stream.Stream<M>findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders)Returns all entities matching the givenPredicateapplying the givenOrderSpecifiers.default org.springframework.data.domain.Page<M>findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable)Returns aPageof entities matching the givenPredicate.default java.util.stream.Stream<M>findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort)Returns all entities matching the givenPredicateapplying the givenSort.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>
RfindBy(com.querydsl.core.types.Predicate predicate, java.util.function.Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,R> queryFunction)Returns entities matching the givenPredicateapplying thequeryFunctionthat defines the query and its result type.default <S extends E,R,Q extends com.querydsl.core.types.EntityPath<E>>
RfindBy(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 givenPredicateorOptional.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>>
MAPPERgetEntityMapper()default <Q extends com.querydsl.core.types.EntityPath<E>>
QgetQueryEntity()<REPO extends org.springframework.data.querydsl.QuerydslPredicateExecutor<E>>
REPOgetRepository()
-
-
-
方法详细资料
-
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 givenPredicateorOptional.empty()if none was found.- 参数:
predicate- must not be null.- 返回:
- a single entity matching the given
PredicateorOptional.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 givenPredicate. In case no match could be found an emptyIterableis 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 givenPredicateapplying the givenSort. In case no match could be found an emptyIterableis returned.- 参数:
predicate- must not be null.sort- theSortspecification to sort the results by, may beSort.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 givenPredicateapplying the givenOrderSpecifiers. In case no match could be found an emptyIterableis returned.- 参数:
predicate- must not be null.orders- theOrderSpecifiers to sort the results by, must not be null.- 返回:
- all entities matching the given
Predicateapplying the givenOrderSpecifiers.
-
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 givenOrderSpecifiers.- 参数:
orders- theOrderSpecifiers 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 aPageof entities matching the givenPredicate. In case no match could be found, an emptyPageis returned.- 参数:
predicate- must not be null.pageable- may bePageable.unpaged(), must not be null.- 返回:
- a
Pageof entities matching the givenPredicate.
-
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 givenPredicate.- 参数:
predicate- thePredicateto 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 givenPredicate.- 参数:
predicate- thePredicateto 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 givenPredicateapplying thequeryFunctionthat 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)
已过时。
-
-