public Object newCompilationKey() { JDBCFetchConfiguration fetch = (JDBCFetchConfiguration) ctx .getFetchConfiguration(); return fetch.getJoinSyntax(); }
public Object newCompilationKey() { JDBCFetchConfiguration fetch = (JDBCFetchConfiguration) ctx .getFetchConfiguration(); return fetch.getJoinSyntax(); }
public Object newCompilationKey() { JDBCFetchConfiguration fetch = (JDBCFetchConfiguration) ctx .getFetchConfiguration(); return fetch.getJoinSyntax(); }
public Object newCompilationKey() { JDBCFetchConfiguration fetch = (JDBCFetchConfiguration) ctx .getFetchConfiguration(); return fetch.getJoinSyntax(); }
public Object newCompilationKey() { JDBCFetchConfiguration fetch = (JDBCFetchConfiguration) ctx .getFetchConfiguration(); return Numbers.valueOf(fetch.getJoinSyntax()); }
List<SliceStoreManager> findTargets() { FetchConfiguration fetch = owner.getContext() .getFetchConfiguration(); return owner.getDistributedStore().getTargets(fetch); }
List<SliceStoreManager> findTargets() { FetchConfiguration fetch = owner.getContext().getFetchConfiguration(); return owner.getDistributedStore().getTargets(fetch); }
List<SliceStoreManager> findTargets() { FetchConfiguration fetch = owner.getContext().getFetchConfiguration(); return owner.getDistributedStore().getTargets(fetch); }
public Executor newDataStoreExecutor(ClassMetaData meta, boolean subs) { Executor ex = _query.newDataStoreExecutor(meta, subs); return new QueryCacheExecutor(ex, meta, subs, getContext().getFetchConfiguration()); }
List<SliceStoreManager> findTargets() { FetchConfiguration fetch = owner.getContext() .getFetchConfiguration(); return owner.getDistributedStore().getTargets(fetch); }
List<SliceStoreManager> findTargets() { FetchConfiguration fetch = owner.getContext() .getFetchConfiguration(); return owner.getDistributedStore().getTargets(fetch); }
public Executor newDataStoreExecutor(ClassMetaData meta, boolean subs) { Executor ex = _query.newDataStoreExecutor(meta, subs); return new QueryCacheExecutor(ex, meta, subs, getContext().getFetchConfiguration()); }
public Executor newDataStoreExecutor(ClassMetaData meta, boolean subs) { Executor ex = _query.newDataStoreExecutor(meta, subs); return new QueryCacheExecutor(ex, meta, subs, getContext().getFetchConfiguration()); }
public Executor newDataStoreExecutor(ClassMetaData meta, boolean subs) { Executor ex = _query.newDataStoreExecutor(meta, subs); return new QueryCacheExecutor(ex, meta, subs, getContext().getFetchConfiguration()); }
List<SliceStoreManager> findTargets() { FetchConfiguration fetch = owner.getContext().getFetchConfiguration(); return owner.getDistributedStore().getTargets(fetch); }
public Executor newDataStoreExecutor(ClassMetaData meta, boolean subs) { ParallelExecutor ex = new ParallelExecutor(this, meta, subs, _parser, ctx.getCompilation()); FetchConfiguration fetch = getContext().getFetchConfiguration(); DistributedStoreManager store = (DistributedStoreManager)getContext() .getStoreContext().getStoreManager().getInnermostDelegate(); List<SliceStoreManager> targets = store.getTargets(fetch); for (StoreQuery q:_queries) { if (targets.contains(((JDBCStoreQuery)q).getStore())) ex.addExecutor(q.newDataStoreExecutor(meta, subs)); } return ex; }
@Override public ResultObjectProvider executeQuery(StoreQuery q, Object[] params, Range range) { try { DBDictionary dict = _store.getDBDictionary(); Connection conn = _store.getConnection(); CallableStatement stmnt = conn.prepareCall(_proc.getCallSQL()); final StoredProcedureQuery spq = StoredProcedureQuery.class.cast(q); for (Column c : spq.getProcedure().getInColumns()) { dict.setUnknown(stmnt, c.getIndex() + 1, params[c.getIndex()], c); } for (Column c : spq.getProcedure().getInOutColumns()) { final int index = c.getIndex() + 1; stmnt.registerOutParameter(index, c.getType()); dict.setUnknown(stmnt, index, params[index - 1], c); } for (Column c : spq.getProcedure().getOutColumns()) { stmnt.registerOutParameter(c.getIndex() + 1, c.getType()); } JDBCFetchConfiguration fetch = (JDBCFetchConfiguration)q.getContext().getFetchConfiguration(); ResultObjectProvider rop = new XROP(_resultMappings, _resultClasses, _store, fetch, stmnt); rop.open(); return rop; } catch (Exception e) { throw new RuntimeException(e); } }
@Override public ResultObjectProvider executeQuery(StoreQuery q, Object[] params, Range range) { try { DBDictionary dict = _store.getDBDictionary(); Connection conn = _store.getConnection(); CallableStatement stmnt = conn.prepareCall(_proc.getCallSQL()); final StoredProcedureQuery spq = StoredProcedureQuery.class.cast(q); for (Column c : spq.getProcedure().getInColumns()) { dict.setUnknown(stmnt, c.getIndex() + 1, params[c.getIndex()], c); } for (Column c : spq.getProcedure().getInOutColumns()) { final int index = c.getIndex() + 1; stmnt.registerOutParameter(index, c.getType()); dict.setUnknown(stmnt, index, params[index - 1], c); } for (Column c : spq.getProcedure().getOutColumns()) { stmnt.registerOutParameter(c.getIndex() + 1, c.getType()); } JDBCFetchConfiguration fetch = (JDBCFetchConfiguration)q.getContext().getFetchConfiguration(); ResultObjectProvider rop = new XROP(_resultMappings, _resultClasses, _store, fetch, stmnt); rop.open(); return rop; } catch (Exception e) { throw new RuntimeException(e); } }
public ResultObjectProvider executeQuery(StoreQuery q, Object[] params, StoreQuery.Range range) { if (_executors.length == 1) return _executors[0].executeQuery(q, params, range); // use lrs settings if we couldn't take advantage of the start index // so that hopefully the skip to the start will be efficient StoreQuery.Range ropRange = new StoreQuery.Range(0, range.end); ropRange.lrs = range.lrs || (range.start > 0 && q.getContext(). getFetchConfiguration().getFetchBatchSize() >= 0); // execute the query; we cannot use the lower bound of the result // range, but we can take advantage of the upper bound ResultObjectProvider[] rops = new ResultObjectProvider[_executors.length]; for (int i = 0; i < _executors.length; i++) rops[i] = _executors[i].executeQuery(q, params, ropRange); boolean[] asc = _executors[0].getAscending(q); ResultObjectProvider rop; if (asc.length == 0) rop = new MergedResultObjectProvider(rops); else rop = new OrderingMergedResultObjectProvider(rops, asc, _executors, q, params); // if there is a lower bound, wrap in range rop if (range.start != 0) rop = new RangeResultObjectProvider(rop, range.start, range.end); return rop; }
public ResultObjectProvider executeQuery(StoreQuery q, Object[] params, StoreQuery.Range range) { if (_executors.length == 1) return _executors[0].executeQuery(q, params, range); // use lrs settings if we couldn't take advantage of the start index // so that hopefully the skip to the start will be efficient StoreQuery.Range ropRange = new StoreQuery.Range(0, range.end); ropRange.lrs = range.lrs || (range.start > 0 && q.getContext(). getFetchConfiguration().getFetchBatchSize() >= 0); // execute the query; we cannot use the lower bound of the result // range, but we can take advantage of the upper bound ResultObjectProvider[] rops = new ResultObjectProvider[_executors.length]; for (int i = 0; i < _executors.length; i++) rops[i] = _executors[i].executeQuery(q, params, ropRange); boolean[] asc = _executors[0].getAscending(q); ResultObjectProvider rop; if (asc.length == 0) rop = new MergedResultObjectProvider(rops); else rop = new OrderingMergedResultObjectProvider(rops, asc, _executors, q, params); // if there is a lower bound, wrap in range rop if (range.start != 0) rop = new RangeResultObjectProvider(rop, range.start, range.end); return rop; }