Package org.apache.openjpa.lib.rop

Examples of org.apache.openjpa.lib.rop.ResultObjectProvider


            // apply projections, order results, and filter duplicates
            results = _factory.project(_exps[0], results, ctx, params);
            results = _factory.order(_exps[0], results, ctx, params);
            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);
            return rop;
        }
View Full Code Here


                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);
        }
View Full Code Here

        if (jfetch.getSubclassFetchMode(mapping) != jfetch.EAGER_JOIN)
            rops = new ResultObjectProvider[mappings.length];

        try {
            // check for custom loads
            ResultObjectProvider rop;
            for (int i = 0; i < mappings.length; i++) {
                rop = mappings[i].customLoad(this, subclasses, jfetch, 0,
                    Long.MAX_VALUE);
                if (rop != null) {
                    if (rops == null)
View Full Code Here

            return emptyResult(q, ex);

        // execute; if we have a result class or we have only one result
        // and so need to remove it from its array, wrap in a packing rop
        range.lrs = isLRS(range.start, range.end);
        ResultObjectProvider rop = ex.executeQuery(q, params, range);
        try {
            return toResult(q, ex, rop, range);
        } catch (Exception e) {
            if (rop != null)
                try { rop.close(); } catch (Exception e2) {}
            throw e;
        }
    }
View Full Code Here

                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);
View Full Code Here

            SQLBuffer buf = new SQLBuffer(dict).append(sql);
            Connection conn = store.getConnection();
            JDBCFetchConfiguration fetch = (JDBCFetchConfiguration)
                q.getContext().getFetchConfiguration();

            ResultObjectProvider rop;
            PreparedStatement stmnt = null;
            try {
                // use the right method depending on sel vs. proc, lrs setting
                if (_select && !range.lrs)
                    stmnt = buf.prepareStatement(conn);
View Full Code Here

                metas = repos.getImplementorMetaDatas(_type,
                    _broker.getClassLoader(), false);
            else
                metas = EMPTY_METAS;

            ResultObjectProvider rop;
            for (int i = 0; i < metas.length; i++) {
                rop = _broker.getStoreManager().executeExtent(metas[i],
                    _subs, _fc);
                if (rop != null)
                    chain.addIterator(new ResultObjectProviderIterator(rop));
View Full Code Here

        }
      }
     
      ResultObjectProvider[] tmp = rops
                    .toArray(new ResultObjectProvider[rops.size()]);
      ResultObjectProvider result = null;
      boolean[] ascending = getAscending(q);
      boolean isAscending = ascending.length > 0;
      boolean isAggregate = ctx.isAggregate();
      boolean hasRange = ctx.getEndRange() != Long.MAX_VALUE;
      if (isAggregate) {
View Full Code Here

          throw new StoreException(e.getCause());
        }
      }
     
      ResultObjectProvider[] tmp = rops.toArray(new ResultObjectProvider[rops.size()]);
      ResultObjectProvider result = null;
      boolean[] ascending = getAscending(q);
      boolean isAscending = ascending.length > 0;
      boolean isAggregate = ctx.isAggregate();
      boolean hasRange = ctx.getEndRange() != Long.MAX_VALUE;
      if (isAggregate) {
View Full Code Here

                }
            } finally {
                store.popFetchConfiguration();
            }

            ResultObjectProvider rop = _ex.executeQuery(cq.getDelegate(), params, range);
            if (_fc.getQueryCacheEnabled())
                return cq.wrapResult(rop, key);
            else
                return rop;
        }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.lib.rop.ResultObjectProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.