cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r544126 - in /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql: EJBQLCompiledExpression.java parser/CompiledExpression.java parser/Compiler.java
Date Mon, 04 Jun 2007 11:41:58 GMT
Author: aadamchik
Date: Mon Jun  4 04:41:57 2007
New Revision: 544126

URL: http://svn.apache.org/viewvc?view=rev&rev=544126
Log:
trying a different strategy with implicit joins - removed them from compiled expression

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/EJBQLCompiledExpression.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/CompiledExpression.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/EJBQLCompiledExpression.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/EJBQLCompiledExpression.java?view=diff&rev=544126&r1=544125&r2=544126
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/EJBQLCompiledExpression.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/EJBQLCompiledExpression.java
Mon Jun  4 04:41:57 2007
@@ -18,8 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.ejbql;
 
-import java.util.Collection;
-
 import org.apache.cayenne.map.ObjRelationship;
 import org.apache.cayenne.reflect.ClassDescriptor;
 
@@ -35,15 +33,6 @@
      * Returns a tree representation of an EJBQL expression.
      */
     EJBQLExpression getExpression();
-
-    /**
-     * Returns a collection of EJBQLExpressions, each representing an implicit join in the
-     * query. The most common example of implicit joins are joins introduced by
-     * relationships in the WHERE clause. Some implicit joins may also have matching
-     * explicit joins in the same query. Such joins are not included in the returned
-     * collection.
-     */
-    Collection getImplicitJoins();
 
     /**
      * Returns a descriptor of the root of this expression such as entity being fetched or

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/CompiledExpression.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/CompiledExpression.java?view=diff&rev=544126&r1=544125&r2=544126
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/CompiledExpression.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/CompiledExpression.java
Mon Jun  4 04:41:57 2007
@@ -18,8 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.ejbql.parser;
 
-import java.util.Collection;
-import java.util.Collections;
 import java.util.Map;
 
 import org.apache.cayenne.ejbql.EJBQLCompiledExpression;
@@ -40,11 +38,6 @@
     private Map descriptorsById;
     private Map incomingById;
     private EJBQLExpression expression;
-    private Collection implicitJoins;
-
-    public Collection getImplicitJoins() {
-        return implicitJoins != null ? implicitJoins : Collections.EMPTY_SET;
-    }
 
     public ClassDescriptor getEntityDescriptor(String idVariable) {
         if (idVariable == null) {
@@ -91,9 +84,5 @@
 
     void setRootId(String rootId) {
         this.rootId = rootId;
-    }
-
-    void setImplicitJoins(Collection implicitJoins) {
-        this.implicitJoins = implicitJoins;
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java?view=diff&rev=544126&r1=544125&r2=544126
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
Mon Jun  4 04:41:57 2007
@@ -18,12 +18,11 @@
  ****************************************************************/
 package org.apache.cayenne.ejbql.parser;
 
-import java.util.ArrayList;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.cayenne.ejbql.EJBQLBaseVisitor;
+import org.apache.cayenne.ejbql.EJBQLCompiledExpression;
 import org.apache.cayenne.ejbql.EJBQLDelegatingVisitor;
 import org.apache.cayenne.ejbql.EJBQLException;
 import org.apache.cayenne.ejbql.EJBQLExpression;
@@ -35,7 +34,7 @@
 import org.apache.cayenne.reflect.Property;
 
 /**
- * A visitor that compiles an EJBQL expression.
+ * Produces an {@link EJBQLCompiledExpression} out of an EJBQL expression tree.
  * 
  * @since 3.0
  * @author Andrus Adamchik
@@ -46,7 +45,6 @@
     private EntityResolver resolver;
     private Map descriptorsById;
     private Map incomingById;
-    private Collection implicitJoins;
     private EJBQLExpressionVisitor fromItemVisitor;
     private EJBQLExpressionVisitor joinVisitor;
     private EJBQLExpressionVisitor whereClauseVisitor;
@@ -56,8 +54,7 @@
         this.resolver = resolver;
         this.descriptorsById = new HashMap();
         this.incomingById = new HashMap();
-        this.implicitJoins = new ArrayList(2);
-
+ 
         this.rootDescriptorVisitor = new SelectExpressionVisitor();
         this.fromItemVisitor = new FromItemVisitor();
         this.joinVisitor = new JoinVisitor();
@@ -73,7 +70,6 @@
 
         compiled.setRootId(rootId);
         compiled.setDescriptorsById(descriptorsById);
-        compiled.setImplicitJoins(implicitJoins);
         compiled.setIncomingById(incomingById);
 
         return compiled;



Mime
View raw message