From 0fb572b5505c83f9d8c4c6f2144d652209c792a3 Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Fri, 23 Jan 2015 10:19:38 +0100 Subject: [PATCH] =?UTF-8?q?DATACMNS-636=20-=20Add=20QueryDslPredicateExecu?= =?UTF-8?q?tor.exists(=E2=80=A6)=20which=20accepts=20a=20Querydsl=20predic?= =?UTF-8?q?ate.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original pull request: #112. --- .../data/querydsl/QueryDslPredicateExecutor.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java b/src/main/java/org/springframework/data/querydsl/QueryDslPredicateExecutor.java index 57cf68e07..a61934eae 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-2014 the original author or authors. + * Copyright 2011-2015 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. @@ -83,4 +83,12 @@ public interface QueryDslPredicateExecutor { * @return the number of instances matching the {@link Predicate}. */ long count(Predicate predicate); + + /** + * Checks whether the data store contains elements that match the given {@link Predicate}. + * + * @param predicate the {@link Predicate} to use for the existance check, can be {@literal null}. + * @return {@literal true} if the data store contains elements that match the given {@link Predicate}. + */ + boolean exists(Predicate predicate); }