DATAKV-96 - Added QueryDslPredicateExecutor.findAll(Predicate, Sort).
We now support findAll on QuerydslKeyValueRepository that accepts a Querydsl Predicate and a Sort. Original pull request: #4.
This commit is contained in:
committed by
Oliver Gierke
parent
8f1bc111b4
commit
c305988582
@@ -22,6 +22,7 @@ import java.io.Serializable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.keyvalue.core.KeyValueOperations;
|
||||
import org.springframework.data.keyvalue.repository.KeyValueRepository;
|
||||
import org.springframework.data.querydsl.EntityPathResolver;
|
||||
@@ -43,6 +44,7 @@ import com.mysema.query.types.path.PathBuilder;
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @param <T> the domain type to manage
|
||||
* @param <ID> the identififer type of the domain type
|
||||
*/
|
||||
@@ -115,6 +117,15 @@ public class QuerydslKeyValueRepository<T, ID extends Serializable> extends Simp
|
||||
return query.list(builder);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.querydsl.QueryDslPredicateExecutor#findAll(com.mysema.query.types.Predicate, org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
public Iterable<T> findAll(Predicate predicate, Sort sort) {
|
||||
return findAll(predicate, toOrderSpecifier(sort, builder));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.querydsl.QueryDslPredicateExecutor#findAll(com.mysema.query.types.Predicate, org.springframework.data.domain.Pageable)
|
||||
@@ -188,5 +199,4 @@ public class QuerydslKeyValueRepository<T, ID extends Serializable> extends Simp
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user