Example #1
0
  /**
   * Deleta país
   *
   * @param pais
   * @return número de países deletados
   * @throws BusinessException
   */
  public int remover(Pais pais) throws BusinessException {

    int rows;
    try {
      rows = dao.remover(pais);
    } catch (IntegrationException ie) {
      throw new BusinessException(LogMessages.ERRO_GERAL_INTEGRACAO, ie);
    }
    return rows;
  }
Example #2
0
  /**
   * Obter todos os países
   *
   * @return lista de país
   * @throws BusinessException
   */
  public List<Pais> obterTodos() throws BusinessException {

    List<Pais> paises;
    try {
      paises = dao.obterTodos();
    } catch (IntegrationException ie) {
      throw new BusinessException(LogMessages.ERRO_GERAL_INTEGRACAO, ie);
    }
    return paises;
  }
Example #3
0
  /**
   * Obter um país através do código
   *
   * @param pais
   * @return
   * @throws BusinessException
   */
  public Pais selecionar(Pais pais) throws BusinessException {

    Pais paisConsult;
    try {
      paisConsult = dao.selecionar(pais);
    } catch (IntegrationException ie) {
      throw new BusinessException(LogMessages.ERRO_GERAL_INTEGRACAO, ie);
    }

    return paisConsult;
  }