mirror of https://github.com/apache/openjpa.git
OPENJPA-1810: Merge performance changes from trunk.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.1.x@1044002 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d49c52b99f
commit
0a087b2679
|
@ -262,6 +262,10 @@ public class QueryCacheStoreQuery
|
||||||
return _query.newCompilation();
|
return _query.newCompilation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object getCompilation() {
|
||||||
|
return _query.getCompilation();
|
||||||
|
}
|
||||||
|
|
||||||
public void populateFromCompilation(Object comp) {
|
public void populateFromCompilation(Object comp) {
|
||||||
_query.populateFromCompilation(comp);
|
_query.populateFromCompilation(comp);
|
||||||
}
|
}
|
||||||
|
@ -331,7 +335,7 @@ public class QueryCacheStoreQuery
|
||||||
public ResultObjectProvider executeQuery(StoreQuery q, Object[] params,
|
public ResultObjectProvider executeQuery(StoreQuery q, Object[] params,
|
||||||
Range range) {
|
Range range) {
|
||||||
QueryCacheStoreQuery cq = (QueryCacheStoreQuery) q;
|
QueryCacheStoreQuery cq = (QueryCacheStoreQuery) q;
|
||||||
Object parsed = cq.getDelegate().newCompilation();
|
Object parsed = cq.getDelegate().getCompilation();
|
||||||
QueryKey key = QueryKey.newInstance(cq.getContext(),
|
QueryKey key = QueryKey.newInstance(cq.getContext(),
|
||||||
_ex.isPacking(q), params, _candidate, _subs, range.start,
|
_ex.isPacking(q), params, _candidate, _subs, range.start,
|
||||||
range.end, parsed);
|
range.end, parsed);
|
||||||
|
|
|
@ -72,6 +72,10 @@ public abstract class AbstractStoreQuery
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object getCompilation() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public void populateFromCompilation(Object comp) {
|
public void populateFromCompilation(Object comp) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,10 @@ public class ExpressionStoreQuery
|
||||||
return _parser.parse(ctx.getQueryString(), this);
|
return _parser.parse(ctx.getQueryString(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object getCompilation() {
|
||||||
|
return _parsed;
|
||||||
|
}
|
||||||
|
|
||||||
public void populateFromCompilation(Object comp) {
|
public void populateFromCompilation(Object comp) {
|
||||||
_parser.populate(comp, this);
|
_parser.populate(comp, this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,11 @@ public interface StoreQuery
|
||||||
* Create a new compilation for this query. May be null.
|
* Create a new compilation for this query. May be null.
|
||||||
*/
|
*/
|
||||||
public Object newCompilation();
|
public Object newCompilation();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current compilation for this query. If it is null, do not create.
|
||||||
|
*/
|
||||||
|
public Object getCompilation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Populate internal data from compilation.
|
* Populate internal data from compilation.
|
||||||
|
|
Loading…
Reference in New Issue