Package org.apache.openjpa.util

Examples of org.apache.openjpa.util.RuntimeExceptionTranslator


     * Translation only occurs if the exception is initiated by a user action
     * on an instance, and therefore will not be caught and translated by the
     * broker.
     */
    protected RuntimeException translate(RuntimeException re) {
        RuntimeExceptionTranslator trans = _broker.getInstanceExceptionTranslator();
        return (trans == null) ? re : trans.translate(re);
    }
View Full Code Here


    try {
        Object ob = execute();
        if (ob instanceof List) {
          List ret = (List) ob;
          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);
              }
View Full Code Here

     * Translation only occurs if the exception is initiated by a user action
     * on an instance, and therefore will not be caught and translated by the
     * broker.
     */
    protected RuntimeException translate(RuntimeException re) {
        RuntimeExceptionTranslator trans = _broker.
            getInstanceExceptionTranslator();
        return (trans == null) ? re : trans.translate(re);
    }
View Full Code Here

     * and {@link NonUniqueResultException} in accordance with
     * section 3.7 of the EJB 3.0 specification.
     */
    public static RuntimeExceptionTranslator getRollbackTranslator(
        final OpenJPAEntityManager em) {
        return new RuntimeExceptionTranslator() {
            private boolean throwing = false;

            public RuntimeException translate(RuntimeException re) {
                RuntimeException ex = toPersistenceException(re);
                if (!(ex instanceof NonUniqueResultException)
View Full Code Here

     * Translation only occurs if the exception is initiated by a user action
     * on an instance, and therefore will not be caught and translated by the
     * broker.
     */
    protected RuntimeException translate(RuntimeException re) {
        RuntimeExceptionTranslator trans = _broker.
            getInstanceExceptionTranslator();
        return (trans == null) ? re : trans.translate(re);
    }
View Full Code Here

    _em.assertNotCloseInvoked();
    Object ob = execute();
    if (ob instanceof List) {
      List ret = (List) ob;
      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);
          }
View Full Code Here

     * Translation only occurs if the exception is initiated by a user action
     * on an instance, and therefore will not be caught and translated by the
     * broker.
     */
    protected RuntimeException translate(RuntimeException re) {
        RuntimeExceptionTranslator trans = _broker.
            getInstanceExceptionTranslator();
        return (trans == null) ? re : trans.translate(re);
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.util.RuntimeExceptionTranslator

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.