Interface QuerydslPredicateExecutor<T>
- All Known Subinterfaces:
- ListQuerydslPredicateExecutor<T>
public interface QuerydslPredicateExecutor<T>
Interface to allow execution of QueryDsl 
Predicate instances.- Author:
- Oliver Gierke, Thomas Darimont, Christoph Strobl, Mark Paluch
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionlongcount(com.querydsl.core.types.Predicate predicate) Returns the number of instances matching the givenPredicate.booleanexists(com.querydsl.core.types.Predicate predicate) Checks whether the data store contains elements that match the givenPredicate.findAll(com.querydsl.core.types.OrderSpecifier<?>... orders) Returns all entities ordered by the givenOrderSpecifiers.findAll(com.querydsl.core.types.Predicate predicate) Returns all entities matching the givenPredicate.findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders) Returns all entities matching the givenPredicateapplying the givenOrderSpecifiers.Returns aPageof entities matching the givenPredicate.Returns all entities matching the givenPredicateapplying the givenSort.<S extends T,R> 
 RfindBy(com.querydsl.core.types.Predicate predicate, Function<FluentQuery.FetchableFluentQuery<S>, R> queryFunction) Returns entities matching the givenPredicateapplying thequeryFunctionthat defines the query and its result type.findOne(com.querydsl.core.types.Predicate predicate) Returns a single entity matching the givenPredicateorOptional.empty()if none was found.
- 
Method Details- 
findOneReturns a single entity matching the givenPredicateorOptional.empty()if none was found.- Parameters:
- predicate- must not be null.
- Returns:
- a single entity matching the given PredicateorOptional.empty()if none was found.
- Throws:
- IncorrectResultSizeDataAccessException- if the predicate yields more than one result.
 
- 
findAllReturns all entities matching the givenPredicate. In case no match could be found an emptyIterableis returned.- Parameters:
- predicate- must not be null.
- Returns:
- all entities matching the given Predicate.
 
- 
findAllReturns all entities matching the givenPredicateapplying the givenSort. In case no match could be found an emptyIterableis returned.- Parameters:
- predicate- must not be null.
- sort- the- Sortspecification to sort the results by, may be- Sort.unsorted(), must not be null.
- Returns:
- all entities matching the given Predicate.
- Since:
- 1.10
 
- 
findAllIterable<T> 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.- Parameters:
- predicate- must not be null.
- orders- the- OrderSpecifiers to sort the results by, must not be null.
- Returns:
- all entities matching the given Predicateapplying the givenOrderSpecifiers.
 
- 
findAllReturns all entities ordered by the givenOrderSpecifiers.- Parameters:
- orders- the- OrderSpecifiers to sort the results by, must not be null.
- Returns:
- all entities ordered by the given OrderSpecifiers.
 
- 
findAllReturns aPageof entities matching the givenPredicate. In case no match could be found, an emptyPageis returned.- Parameters:
- predicate- must not be null.
- pageable- may be- Pageable.unpaged(), must not be null.
- Returns:
- a Pageof entities matching the givenPredicate.
 
- 
countlong count(com.querydsl.core.types.Predicate predicate) Returns the number of instances matching the givenPredicate.- Parameters:
- predicate- the- Predicateto count instances for, must not be null.
- Returns:
- the number of instances matching the Predicate.
 
- 
existsboolean exists(com.querydsl.core.types.Predicate predicate) Checks whether the data store contains elements that match the givenPredicate.- Parameters:
- predicate- the- Predicateto use for the existence check, must not be null.
- Returns:
- true if the data store contains elements that match the given Predicate.
 
- 
findBy<S extends T,R> R findBy(com.querydsl.core.types.Predicate predicate, Function<FluentQuery.FetchableFluentQuery<S>, R> queryFunction) Returns entities matching the givenPredicateapplying thequeryFunctionthat defines the query and its result type.The query object used with queryFunctionis only valid inside thefindBy(…)method call. This requires the query function to return a query result and not theFluentQueryobject itself to ensure the query is executed inside thefindBy(…)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
 
 
-