Package org.apache.openjpa.kernel

Examples of org.apache.openjpa.kernel.DelegatingResultList


        _em.assertNotCloseInvoked();
        Object ob = execute();
        if (ob instanceof List) {
            List ret = (List) ob;
            if (ret instanceof ResultList)
                return new DelegatingResultList((ResultList) ret,
                    PersistenceExceptions.getRollbackTranslator(_em));
            else
                return ret;
        }
View Full Code Here


      if (ret instanceof ResultList) {
          RuntimeExceptionTranslator trans = PersistenceExceptions.getRollbackTranslator(_em);
          if (_query.isDistinct()) {
              return new DistinctResultList((ResultList) ret, trans);
          } else {
              return new DelegatingResultList((ResultList) ret, trans);
          }
      } else {
        return ret;
      }
    }
View Full Code Here

        JpaMigrateQuery.executeUpdate(em, "ALTER TABLE HEADER ADD COLUMN MESSAGE_ID BIGINT");
       
        Query headerQuery = em.createNativeQuery("SELECT MESSAGE_ID, HEADERS_ID FROM MESSAGE_HEADER");
        em.getTransaction().commit();
       
        DelegatingResultList headerNameList = (DelegatingResultList) headerQuery.getResultList();
        ResultList rl = headerNameList.getDelegate();
        for (int i=0; i < rl.size(); i++) {
            Object[] results = (Object[]) rl.get(i);
            Long messageId = (Long) results[0];
            Long headerId = (Long) results[1];
            em.getTransaction().begin();
View Full Code Here

        JpaMigrateQuery.executeUpdate(em, "ALTER TABLE PROPERTY ADD COLUMN MESSAGE_ID BIGINT");

        Query propertyQuery = em.createNativeQuery("SELECT MESSAGE_ID, PROPERTIES_ID FROM MESSAGE_PROPERTY");
        em.getTransaction().commit();

        DelegatingResultList propertyNameList = (DelegatingResultList) propertyQuery.getResultList();
        ResultList rl = propertyNameList.getDelegate();
        for (int i=0; i < rl.size(); i++) {
            Object[] results = (Object[]) rl.get(i);
            Long messageId = (Long) results[0];
            Long propertyId = (Long) results[1];
            em.getTransaction().begin();
View Full Code Here

          if (ret instanceof ResultList) {
              RuntimeExceptionTranslator trans = PersistenceExceptions.getRollbackTranslator(_em);
              if (_query.isDistinct()) {
                  return new DistinctResultList((ResultList) ret, trans);
              } else {
                  return new DelegatingResultList((ResultList) ret, trans);
              }
          } else {
            return ret;
          }
        }
View Full Code Here

          if (ret instanceof ResultList) {
              RuntimeExceptionTranslator trans = PersistenceExceptions.getRollbackTranslator(_em);
              if (_query.isDistinct()) {
                  return new DistinctResultList((ResultList) ret, trans);
              } else {
                  return new DelegatingResultList((ResultList) ret, trans);
              }
          } else {
            return ret;
          }
        }
View Full Code Here

      if (ret instanceof ResultList) {
          RuntimeExceptionTranslator trans = PersistenceExceptions.getRollbackTranslator(_em);
          if (_query.isDistinct()) {
              return new DistinctResultList((ResultList) ret, trans);
          } else {
              return new DelegatingResultList((ResultList) ret, trans);
          }
      } else {
        return ret;
      }
    }
View Full Code Here

        _em.assertNotCloseInvoked();
        Object ob = execute();
        if (ob instanceof List) {
            List ret = (List) ob;
            if (ret instanceof ResultList)
                return new DelegatingResultList((ResultList) ret,
                    PersistenceExceptions.getRollbackTranslator(_em));
            else
                return ret;
        }
View Full Code Here

      if (ret instanceof ResultList) {
          RuntimeExceptionTranslator trans = PersistenceExceptions.getRollbackTranslator(_em);
          if (_query.isDistinct()) {
              return new DistinctResultList((ResultList) ret, trans);
          } else {
              return new DelegatingResultList((ResultList) ret, trans);
          }
      } else {
        return ret;
      }
    }
View Full Code Here

        _em.assertNotCloseInvoked();
        Object ob = execute();
        if (ob instanceof List) {
            List ret = (List) ob;
            if (ret instanceof ResultList)
                return new DelegatingResultList((ResultList) ret,
                    PersistenceExceptions.getRollbackTranslator(_em));
            else
                return ret;
        }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.kernel.DelegatingResultList

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.