openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1200388 - in /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel: ExpressionStoreQuery.java exps/CandidatePath.java exps/Exp.java exps/InMemoryExpressionFactory.java
Date Thu, 10 Nov 2011 15:46:15 GMT
Author: ppoddar
Date: Thu Nov 10 15:46:14 2011
New Revision: 1200388

URL: http://svn.apache.org/viewvc?rev=1200388&view=rev
Log:
Relax query engine for extension

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java?rev=1200388&r1=1200387&r2=1200388&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
Thu Nov 10 15:46:14 2011
@@ -94,8 +94,8 @@ public class ExpressionStoreQuery
         new StringContains(), new WildcardMatch(),
     };
 
-    private final ExpressionParser _parser;
-    private transient Object _parsed;
+    protected final ExpressionParser _parser;
+    protected transient Object _parsed;
 
     /**
      * Construct a query with a parser for the language.
@@ -171,8 +171,8 @@ public class ExpressionStoreQuery
     }
 
     public Executor newInMemoryExecutor(ClassMetaData meta, boolean subs) {
-        return new InMemoryExecutor(this, meta, subs, _parser,
-            ctx.getCompilation());
+        return new InMemoryExecutor(this, meta, subs, _parser,  
+        		ctx.getCompilation(), new InMemoryExpressionFactory());
     }
 
     public Executor newDataStoreExecutor(ClassMetaData meta, boolean subs) {
@@ -576,7 +576,7 @@ public class ExpressionStoreQuery
     /**
      * Runs the expression query in memory.
      */
-    private static class InMemoryExecutor
+    public static class InMemoryExecutor
         extends AbstractExpressionExecutor
         implements Executor, Serializable {
 
@@ -588,10 +588,10 @@ public class ExpressionStoreQuery
 
         public InMemoryExecutor(ExpressionStoreQuery q,
             ClassMetaData candidate, boolean subclasses,
-            ExpressionParser parser, Object parsed) {
+            ExpressionParser parser, Object parsed, InMemoryExpressionFactory factory) {
             _meta = candidate;
             _subs = subclasses;
-            _factory = new InMemoryExpressionFactory();
+            _factory = factory;
 
             _exps = new QueryExpressions[] {
                 parser.eval(parsed, q, _factory, _meta)

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java?rev=1200388&r1=1200387&r2=1200388&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
Thu Nov 10 15:46:14 2011
@@ -167,7 +167,7 @@ public class CandidatePath
     /**
      * Represents a traversal through a field.
      */
-    private static class Traversal {
+    public static class Traversal {
 
         public final FieldMetaData field;
         public final boolean nullTraversal;

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java?rev=1200388&r1=1200387&r2=1200388&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java Thu
Nov 10 15:46:14 2011
@@ -27,7 +27,7 @@ import org.apache.openjpa.kernel.StoreCo
  *
  * @author Abe White
  */
-class Exp
+public class Exp
     implements Expression {
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java?rev=1200388&r1=1200387&r2=1200388&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
Thu Nov 10 15:46:14 2011
@@ -82,7 +82,7 @@ public class InMemoryExpressionFactory
      * of embedded procedural loops over the extents of all variables in the
      * unbounds list.
      */
-    private boolean matches(Exp exp, Object candidate, StoreContext ctx,
+    protected boolean matches(Exp exp, Object candidate, StoreContext ctx,
         Object[] params, int i) {
         // base case: all variables have been aliased; evaluate for current
         // values



Mime
View raw message