mirror of https://github.com/apache/openjpa.git
OPENJPA-703: Support RangeResultObjectProvider for prepared query cache
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@814065 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5120b0e629
commit
ec90648e2b
|
@ -42,6 +42,7 @@ import org.apache.openjpa.kernel.QueryLanguages;
|
|||
import org.apache.openjpa.kernel.StoreQuery;
|
||||
import org.apache.openjpa.kernel.PreparedQueryCache.Exclusion;
|
||||
import org.apache.openjpa.kernel.exps.QueryExpressions;
|
||||
import org.apache.openjpa.lib.rop.RangeResultObjectProvider;
|
||||
import org.apache.openjpa.lib.rop.ResultList;
|
||||
import org.apache.openjpa.lib.util.Localizer;
|
||||
import org.apache.openjpa.util.ImplHelper;
|
||||
|
@ -212,10 +213,13 @@ public class PreparedQueryImpl implements PreparedQuery {
|
|||
if (provider instanceof QueryImpl.PackingResultObjectProvider) {
|
||||
provider = ((QueryImpl.PackingResultObjectProvider)provider).getDelegate();
|
||||
}
|
||||
if (provider instanceof RangeResultObjectProvider) {
|
||||
provider = ((RangeResultObjectProvider)provider).getDelegate();
|
||||
}
|
||||
if (provider instanceof SelectResultObjectProvider) {
|
||||
return new Object[]{((SelectResultObjectProvider)provider).getSelect(), null};
|
||||
}
|
||||
return new Object[]{null, _loc.get("exclude-not-select-rop")};
|
||||
return new Object[]{null, _loc.get("exclude-not-select-rop", provider)};
|
||||
}
|
||||
|
||||
private SelectImpl extractImplementation(SelectExecutor selector) {
|
||||
|
|
|
@ -163,6 +163,7 @@ exclude-no-sql: because target SQL statement can not be extracted \
|
|||
from this query.
|
||||
exclude-no-select: because internal select instance can not be extracted \
|
||||
from this query.
|
||||
exclude-no-select-rop: because the query result is not obtained by executing \
|
||||
a select statement. This can happen if the query was evaluated in-memory.
|
||||
exclude-not-select-rop: because the query result is not obtained by executing \
|
||||
a select statement. This can happen if the query was evaluated in-memory. \
|
||||
The result was provided by an instance of {0}.
|
||||
exclude-not-executor: because this query was not executed on a data store.
|
||||
|
|
Loading…
Reference in New Issue