Skip to content

Commit 7f44de9

Browse files
author
Thomas Darimont
committed
DATACMNS-577 - Improved javadoc on QueryDslPredicateExecutor.
Original pull request: #96.
1 parent 9bc334d commit 7f44de9

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2011 the original author or authors.
2+
* Copyright 2011-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,34 +18,39 @@
1818
import org.springframework.data.domain.Page;
1919
import org.springframework.data.domain.Pageable;
2020

21+
import com.mysema.query.NonUniqueResultException;
2122
import com.mysema.query.types.OrderSpecifier;
2223
import com.mysema.query.types.Predicate;
2324

2425
/**
2526
* Interface to allow execution of QueryDsl {@link Predicate} instances.
2627
*
2728
* @author Oliver Gierke
29+
* @author Thomas Darimont
2830
*/
2931
public interface QueryDslPredicateExecutor<T> {
3032

3133
/**
32-
* Returns a single entity matching the given {@link Predicate}.
34+
* Returns a single entity matching the given {@link Predicate} or {@literal null} if none was found.
35+
* If the predicate yields more than one result a {@link NonUniqueResultException} is thrown.
3336
*
34-
* @param spec
37+
* @param predicate
3538
* @return
3639
*/
3740
T findOne(Predicate predicate);
3841

3942
/**
4043
* Returns all entities matching the given {@link Predicate}.
44+
* In case no match could be found an empty {@link Iterable} is returned.
4145
*
42-
* @param spec
46+
* @param predicate
4347
* @return
4448
*/
4549
Iterable<T> findAll(Predicate predicate);
4650

4751
/**
4852
* Returns all entities matching the given {@link Predicate} applying the given {@link OrderSpecifier}s.
53+
* In case no match could be found an empty {@link Iterable} is returned.
4954
*
5055
* @param predicate
5156
* @param orders
@@ -55,6 +60,7 @@ public interface QueryDslPredicateExecutor<T> {
5560

5661
/**
5762
* Returns a {@link Page} of entities matching the given {@link Predicate}.
63+
* In case no match could be found, an empty {@link Page} is returned.
5864
*
5965
* @param predicate
6066
* @param pageable

0 commit comments

Comments
 (0)