From d488f33cb20fb784c794e51c1ba695f014665af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Westk=C3=A4mper?= Date: Sun, 11 Jul 2010 13:04:21 +0000 Subject: [PATCH] reverted asExpr() form --- .../main/java/com/mysema/query/types/Custom.java | 16 +++++++--------- .../java/com/mysema/query/types/Operation.java | 4 +--- .../main/java/com/mysema/query/types/Path.java | 3 +-- .../java/com/mysema/query/types/SubQuery.java | 3 +-- .../mysema/query/types/custom/CustomMixin.java | 4 ++-- .../mysema/query/types/expr/OperationMixin.java | 4 ++-- .../com/mysema/query/types/path/PathMixin.java | 4 ++-- .../mysema/query/types/query/SubQueryMixin.java | 4 ++-- 8 files changed, 18 insertions(+), 24 deletions(-) diff --git a/querydsl-core/src/main/java/com/mysema/query/types/Custom.java b/querydsl-core/src/main/java/com/mysema/query/types/Custom.java index 6cb04a0ef..7fe262830 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/Custom.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/Custom.java @@ -7,8 +7,6 @@ package com.mysema.query.types; import java.util.List; -import com.mysema.query.types.expr.ESimple; - /** * Custom provides base types for custom expressions with integrated * serialization templates @@ -18,6 +16,13 @@ import com.mysema.query.types.expr.ESimple; */ public interface Custom { + /** + * Cast to {@link Expr} + * + * @return + */ + Expr asExpr(); + /** * Get the argument with the given index * @@ -45,11 +50,4 @@ public interface Custom { */ Class getType(); - /** - * Cast to {@link Expr} - * - * @return - */ - ESimple asExpr(); - } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/Operation.java b/querydsl-core/src/main/java/com/mysema/query/types/Operation.java index 3010035da..18a6911e7 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/Operation.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/Operation.java @@ -7,8 +7,6 @@ package com.mysema.query.types; import java.util.List; -import com.mysema.query.types.expr.ESimple; - /** * Operation represents an operation with operator and arguments * @@ -22,7 +20,7 @@ public interface Operation { * * @return */ - ESimple asExpr(); + Expr asExpr(); /** * Get the argument with the given index diff --git a/querydsl-core/src/main/java/com/mysema/query/types/Path.java b/querydsl-core/src/main/java/com/mysema/query/types/Path.java index 8a5a5a4ab..62ce568b6 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/Path.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/Path.java @@ -8,7 +8,6 @@ package com.mysema.query.types; import java.lang.reflect.AnnotatedElement; import com.mysema.query.types.expr.EBoolean; -import com.mysema.query.types.expr.ESimple; /** * Path represents a path expression @@ -22,7 +21,7 @@ public interface Path { * * @return */ - ESimple asExpr(); + Expr asExpr(); /** * Get the metadata for this path diff --git a/querydsl-core/src/main/java/com/mysema/query/types/SubQuery.java b/querydsl-core/src/main/java/com/mysema/query/types/SubQuery.java index 51ac32e5d..cd3c0a122 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/SubQuery.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/SubQuery.java @@ -7,7 +7,6 @@ package com.mysema.query.types; import com.mysema.query.QueryMetadata; import com.mysema.query.types.expr.EBoolean; -import com.mysema.query.types.expr.ESimple; import com.mysema.query.types.query.Detachable; /** @@ -48,6 +47,6 @@ public interface SubQuery{ * * @return */ - ESimple asExpr(); + Expr asExpr(); } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/custom/CustomMixin.java b/querydsl-core/src/main/java/com/mysema/query/types/custom/CustomMixin.java index bf3cd5019..5b88738e1 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/custom/CustomMixin.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/custom/CustomMixin.java @@ -24,7 +24,7 @@ public final class CustomMixin implements Custom, Serializable { private static final long serialVersionUID = 6951623726800809083L; - private final ESimple self; + private final Expr self; private final List> args; @@ -76,7 +76,7 @@ public final class CustomMixin implements Custom, Serializable { } @Override - public ESimple asExpr() { + public Expr asExpr() { return self; } } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/expr/OperationMixin.java b/querydsl-core/src/main/java/com/mysema/query/types/expr/OperationMixin.java index 074954656..2d4702b4a 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/expr/OperationMixin.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/expr/OperationMixin.java @@ -26,7 +26,7 @@ public final class OperationMixin implements Operation, Serializable { private final Operator operator; - private final ESimple self; + private final Expr self; public OperationMixin(Operation self, Operator operator, List> args){ this.self = self.asExpr(); @@ -35,7 +35,7 @@ public final class OperationMixin implements Operation, Serializable { } @Override - public ESimple asExpr() { + public Expr asExpr() { return self; } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/path/PathMixin.java b/querydsl-core/src/main/java/com/mysema/query/types/path/PathMixin.java index 8fd6c51ed..ba734490d 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/path/PathMixin.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/path/PathMixin.java @@ -39,7 +39,7 @@ public final class PathMixin implements Path, Serializable { private final Path root; - private final ESimple self; + private final Expr self; @Nullable private AnnotatedElement annotatedElement; @@ -51,7 +51,7 @@ public final class PathMixin implements Path, Serializable { } @Override - public ESimple asExpr() { + public Expr asExpr() { return self; } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/query/SubQueryMixin.java b/querydsl-core/src/main/java/com/mysema/query/types/query/SubQueryMixin.java index 03491df27..5664c01c1 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/query/SubQueryMixin.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/query/SubQueryMixin.java @@ -28,7 +28,7 @@ public class SubQueryMixin implements SubQuery{ private final QueryMetadata metadata; - private final ESimple self; + private final Expr self; public SubQueryMixin(SubQuery self, QueryMetadata metadata){ this.self = self.asExpr(); @@ -70,7 +70,7 @@ public class SubQueryMixin implements SubQuery{ } @Override - public ESimple asExpr() { + public Expr asExpr() { return self; }