mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-24 21:07:26 +08:00
This commit is contained in:
parent
ea284c0db6
commit
35b3dde309
@ -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<C> {
|
||||
*/
|
||||
public interface PCollection<D> extends Path<java.util.Collection<D>>, CollectionType<D>{
|
||||
Class<D> getElementType();
|
||||
EBoolean contains(D child);
|
||||
EBoolean contains(Expr<D> child);
|
||||
EComparable<Integer> size();
|
||||
}
|
||||
|
||||
@ -150,6 +153,12 @@ public interface Path<C> {
|
||||
public EComparable<Integer> size() {
|
||||
return size == null ? size = new PComparable<Integer>(Integer.class, forSize(this)) : size;
|
||||
}
|
||||
public EBoolean contains(D child) {
|
||||
return Grammar.in(child, this);
|
||||
}
|
||||
public EBoolean contains(Expr<D> child) {
|
||||
return IntGrammar.in(child, this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -280,6 +289,12 @@ public interface Path<C> {
|
||||
public EComparable<Integer> size() {
|
||||
return size == null ? size = new PComparable<Integer>(Integer.class, forSize(this)) : size;
|
||||
}
|
||||
public EBoolean contains(D child) {
|
||||
return Grammar.in(child, this);
|
||||
}
|
||||
public EBoolean contains(Expr<D> child) {
|
||||
return IntGrammar.in(child, this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user