Package br.jus.tjrn.arq.exception

Examples of br.jus.tjrn.arq.exception.DataAccessException


        }

        msgExcecaoTraduzida = msgExcecaoTraduzida.trim();

        if (msgExcecaoTraduzida.length() > 0) {
            return new DataAccessException(msgExcecaoTraduzida, dae);
        } else {
            return new DataAccessException(dae);
        }
    }
View Full Code Here


             *
             * A idéia é que para a camada cliente só sejam disparadas exceções:
             * - Implementadas na camada arq-persistence;
             * - Exceções padrão JAVA, que podem "passear" por todas as camadas de uma aplicação. Ex: IllegalArgumentException.
             */
            throw new DataAccessException(e);
        }
    }
View Full Code Here

        } catch (PersistenceValidateException e) {
            throw new PersistenceValidateException(e);
        } catch (org.springframework.dao.DataAccessException e) {
            throw DataAcessExceptionTranslator.translate(e);           
        } catch (Exception e) {
            throw new DataAccessException(e);
        }
    }
View Full Code Here

  @Override
    public T findById(Serializable id) {
      try {
          return ht.get(persistentClass, id);
        } catch (org.springframework.dao.DataAccessException e) {
            throw new DataAccessException(e);
        }
  }
View Full Code Here

            List listCountAll = ht.find("select count(*) from " + persistentClass.getName() + " persistent ");
            if (listCountAll != null  && listCountAll.size() > 0) {
                result = (Long) listCountAll.get(0);
            }
        } catch (Exception e) {
            throw new DataAccessException(e);
        }

        return result.intValue();
  }
View Full Code Here

      try {
          DetachedCriteria criteria = mountCriteriaForFindByAttributes(entity, null, null);
          result.addAll(ht.findByCriteria(criteria, firstResult, maxResult));
        } catch (Exception e) {
            throw new DataAccessException(e);
        }

    return result;
  }
View Full Code Here

        try {
            DetachedCriteria criteria = mountCriteriaForFindByAttributes(entity, sortField, sortOrder);
            result.addAll(ht.findByCriteria(criteria, firstResult, maxResult));
        } catch (Exception e) {
            throw new DataAccessException(e);
        }

        return result;
    }
View Full Code Here

            }
           
            result = countByCriteria(criteria);
           
        } catch (Exception e) {
            throw new DataAccessException(e);
        }
       
        return result;
    }
View Full Code Here

      try {
          DetachedCriteria criteria = mountCriteriaForFindByAttributes(entity, null, null);

          result = countByCriteria(criteria);
        } catch (Exception e) {
            throw new DataAccessException(e);
        }

        return result;
  }
View Full Code Here

          }
         
          result = countByCriteria(criteria);
         
        } catch (Exception e) {
            throw new DataAccessException(e);
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of br.jus.tjrn.arq.exception.DataAccessException

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.