improved Query interface by adding varargs for where and other methods

This commit is contained in:
Timo Westkämper 2009-01-04 14:26:52 +00:00
parent 11c39c29fb
commit ea3d27fd53
2 changed files with 6 additions and 6 deletions

View File

@ -22,8 +22,8 @@ public interface Query<A extends Query<A>>{
A fullJoin(EEntity<?> o);
A leftJoin(EEntity<?> o);
A with(Expr.EBoolean o);
A where(Expr.EBoolean o);
A where(Expr.EBoolean... o);
A groupBy(Expr<?>... o);
A having(Expr.EBoolean o);
A having(Expr.EBoolean... o);
A orderBy(OrderSpecifier<?>... o);
}

View File

@ -52,8 +52,8 @@ public class QueryBase<JoinMeta,A extends QueryBase<JoinMeta,A>> implements Quer
return (A) this;
}
public A having(Expr.EBoolean o) {
having.and(o);
public A having(Expr.EBoolean... o) {
for (Expr.EBoolean b : o) having.and(b);
return (A) this;
}
@ -87,8 +87,8 @@ public class QueryBase<JoinMeta,A extends QueryBase<JoinMeta,A>> implements Quer
return (A) this;
}
public A where(Expr.EBoolean o) {
where.and(o);
public A where(Expr.EBoolean... o) {
for (Expr.EBoolean b : o) where.and(b);
return (A) this;
}