Skip to content

DATACMNS-577 - Improved javadoc on QueryDslPredicateExecutor. #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>1.10.0.BUILD-SNAPSHOT</version>
<version>1.10.0.DATACMNS-577-SNAPSHOT</version>

<name>Spring Data Core</name>

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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;

Expand All @@ -25,27 +26,31 @@
* Interface to allow execution of QueryDsl {@link Predicate} instances.
*
* @author Oliver Gierke
* @author Thomas Darimont
*/
public interface QueryDslPredicateExecutor<T> {

/**
* 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<T> 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
Expand All @@ -55,6 +60,7 @@ public interface QueryDslPredicateExecutor<T> {

/**
* 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
Expand Down