From 35b3dde30966759fd61e0428888f08b1ba4d91ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Westk=C3=A4mper?= Date: Tue, 6 Jan 2009 18:57:06 +0000 Subject: [PATCH] --- .../java/com/mysema/query/grammar/types/Path.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/querydsl-core/src/main/java/com/mysema/query/grammar/types/Path.java b/querydsl-core/src/main/java/com/mysema/query/grammar/types/Path.java index ec0e397e4..54742416a 100644 --- a/querydsl-core/src/main/java/com/mysema/query/grammar/types/Path.java +++ b/querydsl-core/src/main/java/com/mysema/query/grammar/types/Path.java @@ -9,6 +9,7 @@ import static com.mysema.query.grammar.types.PathMetadata.*; import java.lang.reflect.Array; +import com.mysema.query.grammar.Grammar; import com.mysema.query.grammar.types.Expr.EBoolean; import com.mysema.query.grammar.types.Expr.EComparable; import com.mysema.query.grammar.types.Expr.EEntity; @@ -92,6 +93,8 @@ public interface Path { */ public interface PCollection extends Path>, CollectionType{ Class getElementType(); + EBoolean contains(D child); + EBoolean contains(Expr child); EComparable size(); } @@ -150,6 +153,12 @@ public interface Path { public EComparable size() { return size == null ? size = new PComparable(Integer.class, forSize(this)) : size; } + public EBoolean contains(D child) { + return Grammar.in(child, this); + } + public EBoolean contains(Expr child) { + return IntGrammar.in(child, this); + } } /** @@ -280,6 +289,12 @@ public interface Path { public EComparable size() { return size == null ? size = new PComparable(Integer.class, forSize(this)) : size; } + public EBoolean contains(D child) { + return Grammar.in(child, this); + } + public EBoolean contains(Expr child) { + return IntGrammar.in(child, this); + } } /**