refactored imports in querydsl-hibernate template

This commit is contained in:
Timo Westkämper 2008-03-03 21:07:56 +00:00
parent 1852617936
commit d50a370a34
2 changed files with 11 additions and 9 deletions

View File

@ -25,7 +25,7 @@ public class QueryBase<A extends QueryBase<A>> implements Query<A> {
DEFAULT,IJ,LJ,J
}
public class JoinExpression{
public static class JoinExpression{
public final JoinType type;
public final ExprEntity<?> target;
JoinExpression(JoinType type, ExprEntity<?> target){
@ -36,10 +36,10 @@ public class QueryBase<A extends QueryBase<A>> implements Query<A> {
}
protected final List<JoinExpression> joins = new ArrayList<JoinExpression>();
protected final List<Expr> groupBy = new ArrayList<Expr>();
protected final List<Expr<?>> groupBy = new ArrayList<Expr<?>>();
protected final List<ExprBoolean> having = new ArrayList<ExprBoolean>();
protected final List<OrderSpecifier> orderBy = new ArrayList<OrderSpecifier>();
protected final List<Expr> select = new ArrayList<Expr>();
protected final List<OrderSpecifier<?>> orderBy = new ArrayList<OrderSpecifier<?>>();
protected final List<Expr<?>> select = new ArrayList<Expr<?>>();
protected final List<ExprBoolean> where = new ArrayList<ExprBoolean>();
protected void clear(){
@ -50,7 +50,7 @@ public class QueryBase<A extends QueryBase<A>> implements Query<A> {
select.clear();
where.clear();
}
public A from(ExprEntity<?>... o) {
for (ExprEntity<?> expr : o){
joins.add(new JoinExpression(JoinType.DEFAULT,expr));

View File

@ -90,6 +90,10 @@ public class Types {
ExprBoolean lt(Expr<D> right);
}
public interface ExprString extends ExprComparable<String>{
}
/**
* Reference to an entity
@ -133,8 +137,7 @@ public class Types {
implements ExprBoolean {
public ExprBoolean and(ExprBoolean right) {return Grammar.and(this, right);}
public ExprBoolean or(ExprBoolean right) {return Grammar.or(this, right);}
}
}
public enum Order{ ASC,DESC }
@ -202,7 +205,6 @@ public class Types {
public static class PathEntityCollection<D> extends Path<Collection<D>> implements
ExprEntity<Collection<D>>{
PathEntityCollection(Class<D> type, String p) {
// FIXME
super(null, p);
}
public AliasCollection<D> as(PathEntity<D> to) {
@ -219,7 +221,7 @@ public class Types {
}
}
public static class PathString extends PathComparable<String>{
public static class PathString extends PathComparable<String> implements ExprString{
public PathString(String p) {
super(String.class, p);
}