fixed compilation errors

This commit is contained in:
Timo Westkämper 2008-04-03 21:04:00 +00:00
parent deb2fe7502
commit 2cfe17028b
4 changed files with 20 additions and 15 deletions

View File

@ -12,6 +12,7 @@
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-core</artifactId>
<name>querydsl core</name>
<packaging>jar</packaging>
<dependencies>

View File

@ -8,6 +8,8 @@ package com.mysema.query;
import com.mysema.query.grammar.OrderSpecifier;
import com.mysema.query.grammar.types.Expr;
import static com.mysema.query.grammar.types.Expr.*;
/**
* Query provides a the query interface of the fluent query DSL
*
@ -16,11 +18,11 @@ import com.mysema.query.grammar.types.Expr;
*/
public interface Query<A extends Query<A>>{
A select(Expr<?>... o);
A from(Expr.Entity<?>... o);
@Deprecated A innerJoin(Expr.Entity<?> o);
@Deprecated A join(Expr.Entity<?> o);
@Deprecated A fullJoin(Expr.Entity<?> o);
@Deprecated A leftJoin(Expr.Entity<?> o);
A from(Entity<?>... o);
@Deprecated A innerJoin(Entity<?> o);
@Deprecated A join(Entity<?> o);
@Deprecated A fullJoin(Entity<?> o);
@Deprecated A leftJoin(Entity<?> o);
@Deprecated A with(Expr.Boolean... o);
A where(Expr.Boolean... o);
A groupBy(Expr<?>... o);

View File

@ -11,6 +11,8 @@ import java.util.List;
import com.mysema.query.grammar.OrderSpecifier;
import com.mysema.query.grammar.types.Expr;
import static com.mysema.query.grammar.types.Expr.*;
/**
* QueryBase provides a basic implementation of the Query interface
*
@ -38,8 +40,8 @@ public class QueryBase<A extends QueryBase<A>> implements Query<A> {
private final Metadata metadata = new Metadata();
public A from(Expr.Entity<?>... o) {
for (Expr.Entity<?> expr : o){
public A from(Entity<?>... o) {
for (Entity<?> expr : o){
joins.add(new JoinExpression(JoinType.DEFAULT,expr));
}
return (A) this;
@ -55,22 +57,22 @@ public class QueryBase<A extends QueryBase<A>> implements Query<A> {
return (A) this;
}
public A innerJoin(Expr.Entity<?> o) {
public A innerJoin(Entity<?> o) {
joins.add(new JoinExpression(JoinType.INNERJOIN,o));
return (A) this;
}
public A fullJoin(Expr.Entity<?> o) {
public A fullJoin(Entity<?> o) {
joins.add(new JoinExpression(JoinType.FULLJOIN,o));
return (A) this;
}
public A join(Expr.Entity<?> o) {
public A join(Entity<?> o) {
joins.add(new JoinExpression(JoinType.JOIN,o));
return (A) this;
}
public A leftJoin(Expr.Entity<?> o) {
public A leftJoin(Entity<?> o) {
joins.add(new JoinExpression(JoinType.LEFTJOIN,o));
return (A) this;
}

View File

@ -15,16 +15,16 @@ import com.mysema.query.grammar.Ops.Op;
*/
public class Factory {
public static void checkArg(String name, Object obj) {
if (obj == null) throw new IllegalArgumentException(name + " was null");
}
public static final Expr.Boolean createBoolean(Op<Boolean> operator, Expr<?>... args) {
checkArg("operator",operator);
checkArg("args",args);
return new Operation.Boolean(operator, args);
}
public static void checkArg(String name, Object obj) {
if (obj == null) throw new IllegalArgumentException(name + " was null");
}
public static final <OP, RT extends Comparable<RT>> Expr.Comparable<RT> createComparable(Op<OP> operator, Expr<?>... args) {
checkArg("operator",operator);
checkArg("args",args);