diff --git a/pom.xml b/pom.xml
index 44b1e51deb..b1582d43db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-commons
- 1.10.0.BUILD-SNAPSHOT
+ 1.10.0.DATACMNS-577-SNAPSHOT
Spring Data Core
diff --git a/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java b/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java
index 54dc33723c..ba0da9acb7 100644
--- a/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java
+++ b/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011 the original author or authors.
+ * Copyright 2011-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
*/
package org.springframework.data.querydsl;
+import org.springframework.dao.IncorrectResultSizeDataAccessException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -25,27 +26,31 @@
* Interface to allow execution of QueryDsl {@link Predicate} instances.
*
* @author Oliver Gierke
+ * @author Thomas Darimont
*/
public interface QueryDslPredicateExecutor {
/**
- * Returns a single entity matching the given {@link Predicate}.
+ * Returns a single entity matching the given {@link Predicate} or {@literal null} if none was found.
+ * If the predicate yields more than one result a {@link IncorrectResultSizeDataAccessException} is thrown.
*
- * @param spec
+ * @param predicate
* @return
*/
T findOne(Predicate predicate);
/**
* Returns all entities matching the given {@link Predicate}.
+ * In case no match could be found an empty {@link Iterable} is returned.
*
- * @param spec
+ * @param predicate
* @return
*/
Iterable findAll(Predicate predicate);
/**
* 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.
*
* @param predicate
* @param orders
@@ -55,6 +60,7 @@ public interface QueryDslPredicateExecutor {
/**
* Returns a {@link Page} of entities matching the given {@link Predicate}.
+ * In case no match could be found, an empty {@link Page} is returned.
*
* @param predicate
* @param pageable