public boolean next() throws Exception { return absolute(_idx + 1); }
public ResultObjectProvider executeExtent(ClassMetaData meta, boolean subclasses, FetchConfiguration fetch) { // ask the store for all ObjectDatas for the given type; this // actually gives us all instances of the base class of the type ObjectData[] datas = _store.getData(meta); Class candidate = meta.getDescribedType(); // create a list of the corresponding persistent objects that // match the type and subclasses criteria List pcs = new ArrayList(datas.length); for (int i = 0; i < datas.length; i++) { // does this instance belong in the extent? Class c = datas[i].getMetaData().getDescribedType(); if (c != candidate && (!subclasses || !candidate.isAssignableFrom(c))) continue; // look up the pc instance for the data, passing in the data // as well so that we can take advantage of the fact that we've // already looked it up. note that in the store manager's // initialize(), load(), etc methods we check for this data // being passed through and save ourselves a trip to the store // if it is present; this is particularly important in systems // where a trip to the store can be expensive. pcs.add(ctx.find(datas[i].getId(), fetch, null, datas[i], 0)); } return new ListResultObjectProvider(pcs); } public boolean isCached(List<Object> oids, BitSet edata) {
public ResultObjectProvider executeExtent(ClassMetaData meta, boolean subclasses, FetchConfiguration fetch) { // ask the store for all ObjectDatas for the given type; this // actually gives us all instances of the base class of the type ObjectData[] datas = _store.getData(meta); Class candidate = meta.getDescribedType(); // create a list of the corresponding persistent objects that // match the type and subclasses criteria List pcs = new ArrayList(datas.length); for (int i = 0; i < datas.length; i++) { // does this instance belong in the extent? Class c = datas[i].getMetaData().getDescribedType(); if (c != candidate && (!subclasses || !candidate.isAssignableFrom(c))) continue; // look up the pc instance for the data, passing in the data // as well so that we can take advantage of the fact that we've // already looked it up. note that in the store manager's // initialize(), load(), etc methods we check for this data // being passed through and save ourselves a trip to the store // if it is present; this is particularly important in systems // where a trip to the store can be expensive. pcs.add(ctx.find(datas[i].getId(), fetch, null, datas[i], 0)); } return new ListResultObjectProvider(pcs); } public boolean isCached(List<Object> oids, BitSet edata) {
public ResultObjectProvider executeQuery(StoreQuery q, Object[] params, Range range) { QueryCacheStoreQuery cq = (QueryCacheStoreQuery) q; QueryKey key = QueryKey.newInstance(cq.getContext(), _ex.isPacking(q), params, _candidate, _subs, range.start, range.end); List cached = cq.checkCache(key); if (cached != null) return new ListResultObjectProvider(cached); ResultObjectProvider rop = _ex.executeQuery(cq.getDelegate(), params, range); return cq.wrapResult(rop, key); }
public boolean next() throws Exception { return absolute(_idx + 1); }
ImplHelper.close(itr); rop = new ListResultObjectProvider(results); } else {
public boolean next() throws Exception { return absolute(_idx + 1); }
ImplHelper.close(itr); rop = new ListResultObjectProvider(results); } else {
public boolean next() throws Exception { return absolute(_idx + 1); }
ImplHelper.close(itr); rop = new ListResultObjectProvider(results); } else {
ImplHelper.close(itr); rop = new ListResultObjectProvider(results); } else {
ImplHelper.close(itr); rop = new ListResultObjectProvider(results); } else {
results = _factory.distinct(_exps[0], coll == null, results); ResultObjectProvider rop = new ListResultObjectProvider(results); if (range.start != 0 || range.end != Long.MAX_VALUE) rop = new RangeResultObjectProvider(rop, range.start,range.end);
results = _factory.distinct(_exps[0], coll == null, results); ResultObjectProvider rop = new ListResultObjectProvider(results); if (range.start != 0 || range.end != Long.MAX_VALUE) rop = new RangeResultObjectProvider(rop, range.start,range.end);
results = _factory.distinct(_exps[0], coll == null, results); ResultObjectProvider rop = new ListResultObjectProvider(results); if (range.start != 0 || range.end != Long.MAX_VALUE) rop = new RangeResultObjectProvider(rop, range.start,range.end);
results = _factory.distinct(_exps[0], coll == null, results); ResultObjectProvider rop = new ListResultObjectProvider(results); if (range.start != 0 || range.end != Long.MAX_VALUE) rop = new RangeResultObjectProvider(rop, range.start,range.end);
results = _factory.distinct(_exps[0], coll == null, results); ResultObjectProvider rop = new ListResultObjectProvider(results); if (range.start != 0 || range.end != Long.MAX_VALUE) rop = new RangeResultObjectProvider(rop, range.start,range.end);
public ResultObjectProvider executeQuery(StoreQuery q, Object[] params, Range range) { QueryCacheStoreQuery cq = (QueryCacheStoreQuery) q; Object parsed = cq.getDelegate().getCompilation(); QueryKey key = QueryKey.newInstance(cq.getContext(), _ex.isPacking(q), params, _candidate, _subs, range.start, range.end, parsed); List<Object> cached = cq.checkCache(key); if (cached != null) return new ListResultObjectProvider(cached); ResultObjectProvider rop = _ex.executeQuery(cq.getDelegate(), params, range); if (_fc.getQueryCacheEnabled()) return cq.wrapResult(rop, key); else return rop; }
public ResultObjectProvider executeQuery(StoreQuery q, Object[] params, Range range) { QueryCacheStoreQuery cq = (QueryCacheStoreQuery) q; Object parsed = cq.getDelegate().getCompilation(); QueryKey key = QueryKey.newInstance(cq.getContext(), _ex.isPacking(q), params, _candidate, _subs, range.start, range.end, parsed); List<Object> cached = cq.checkCache(key); if (cached != null) return new ListResultObjectProvider(cached); ResultObjectProvider rop = _ex.executeQuery(cq.getDelegate(), params, range); if (_fc.getQueryCacheEnabled()) return cq.wrapResult(rop, key); else return rop; }
List<Object> cached = cq.checkCache(key, cacheFc); if (cached != null) { return new ListResultObjectProvider(cached);