From ec643d21cb6db4ef64b215025de4e1a5f0653eaa Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Mon, 23 Feb 2015 11:50:56 +0100 Subject: [PATCH] DATACMNS-554 - Added QueryDslPredicateExecutor.findAll(Predicate, Sort). We now support findAll on QueryDslPredicateExecutor that accepts a Querydsl Predicate and a Sort. Original pull request: #115. --- .../data/querydsl/QueryDslPredicateExecutor.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java b/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java index a61934eae..92a47c0d1 100644 --- a/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java +++ b/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java @@ -17,6 +17,7 @@ package org.springframework.data.querydsl; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; import com.mysema.query.types.OrderSpecifier; import com.mysema.query.types.Predicate; @@ -48,6 +49,17 @@ public interface QueryDslPredicateExecutor { */ Iterable findAll(Predicate predicate); + /** + * Returns all entities matching the given {@link Predicate} applying the given {@link Sort}. In case no match could + * be found an empty {@link Iterable} is returned. + * + * @param predicate can be {@literal null}. + * @param sort the {@link Sort} specification to sort the results by, must not be {@literal null}. + * @return all entities matching the given {@link Predicate}. + * @since 1.10 + */ + Iterable findAll(Predicate predicate, Sort sort); + /** * Returns all entities matching the given {@link Predicate} applying the given {@link OrderSpecifier}s. In case no * match could be found an empty {@link Iterable} is returned.