Relax query engine for extension

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1200388 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2011-11-10 15:46:14 +00:00
parent 5fafa802aa
commit 83bc7aa8ef
4 changed files with 10 additions and 10 deletions

View File

@ -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)

View File

@ -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;

View File

@ -27,7 +27,7 @@ import org.apache.openjpa.kernel.StoreContext;
*
* @author Abe White
*/
class Exp
public class Exp
implements Expression {
/**

View File

@ -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