Package org.apache.openjpa.lib.rop

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


        // now that we've executed the query, we can call isAggregate and
        // hasGrouping efficiently
        boolean detach = (_broker.getAutoDetach() &
            AutoDetach.DETACH_NONTXREAD) > 0 && !_broker.isActive();
        boolean lrs = range.lrs && !ex.isAggregate(q) && !ex.hasGrouping(q);
        ResultList<?> res = new ListResultList(Collections.emptyList());
        try {
            res = (!detach && lrs) ? _fc.newResultList(rop) : new EagerResultList(rop);
            res.setUserObject(new Object[]{rop,ex});
            _resultLists.add(decorateResultList(res));
        } catch (OpenJPAException e) {
            if (e.getFailedObject() == null) {
                e.setFailedObject(getQueryString());
            }
View Full Code Here


   
    public void testRoundtrip() {
        List<String> list = new ArrayList<String>();
        list.add("xxx");
        list.add("yyy");
        ResultList resultList = new ListResultList(list);
        EntityManagerImpl em = (EntityManagerImpl)emf.createEntityManager();
        em.close();
        RuntimeExceptionTranslator trans = PersistenceExceptions.getRollbackTranslator(em);
        DistinctResultList distinctResultList = new DistinctResultList(resultList, trans);
        try {
View Full Code Here

   
    public void testRoundtrip() {
        List<String> list = new ArrayList<String>();
        list.add("xxx");
        list.add("yyy");
        ResultList resultList = new ListResultList(list);
        EntityManagerImpl em = (EntityManagerImpl)emf.createEntityManager();
        em.close();
        RuntimeExceptionTranslator trans = PersistenceExceptions.getRollbackTranslator(em);
        DistinctResultList distinctResultList = new DistinctResultList(resultList, trans);
        try {
View Full Code Here

        // now that we've executed the query, we can call isAggregate and
        // hasGrouping efficiently
        boolean detach = (_broker.getAutoDetach() &
            AutoDetach.DETACH_NONTXREAD) > 0 && !_broker.isActive();
        boolean lrs = range.lrs && !ex.isAggregate(q) && !ex.hasGrouping(q);
        ResultList<?> res = new ListResultList(Collections.emptyList());
        try {
            res = (!detach && lrs) ? _fc.newResultList(rop) : new EagerResultList(rop);
            res.setUserObject(new Object[]{rop,ex});
            _resultLists.add(decorateResultList(res));
        } catch (OpenJPAException e) {
            if (e.getFailedObject() == null) {
                e.setFailedObject(getQueryString());
            }
View Full Code Here

TOP

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

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.