Exemplo n.º 1
0
  public ConceptoPago getConceptoPagoPorPK(ConceptoPagoId pId) throws BusinessException {
    ConceptoPago domain = null;
    List<ConceptoPago> lista = null;
    try {
      HashMap<String, Object> mapa = new HashMap<String, Object>();
      mapa.put("intPersEmpresaPk", pId.getIntPersEmpresaPk());
      mapa.put("intCuentaPk", pId.getIntCuentaPk());
      mapa.put("intItemCuentaConcepto", pId.getIntItemCuentaConcepto());
      mapa.put("intItemCtaCptoDet", pId.getIntItemCtaCptoDet());
      mapa.put("intItemConceptoPago", pId.getIntItemConceptoPago());

      lista = dao.getListaPorPK(mapa);
      if (lista != null) {
        if (lista.size() == 1) {
          domain = lista.get(0);
        } else if (lista.size() == 0) {
          domain = null;
        } else {
          throw new BusinessException("Obtención de mas de un registro coincidente");
        }
      }
    } catch (DAOException e) {
      throw new BusinessException(e);
    } catch (BusinessException e) {
      throw e;
    } catch (Exception e) {
      throw new BusinessException(e);
    }
    return domain;
  }
Exemplo n.º 2
0
 public ConceptoPago modificar(ConceptoPago o) throws BusinessException {
   ConceptoPago dto = null;
   try {
     dto = dao.modificar(o);
   } catch (DAOException e) {
     throw new BusinessException(e);
   } catch (Exception e) {
     throw new BusinessException(e);
   }
   return dto;
 }
Exemplo n.º 3
0
  public List<ConceptoPago> getListaConceptoPagoPorCuentaConceptoDet(CuentaConceptoDetalleId pId)
      throws BusinessException {
    List<ConceptoPago> lista = null;
    try {
      HashMap<String, Object> mapa = new HashMap<String, Object>();
      mapa.put("intPersEmpresaPk", pId.getIntPersEmpresaPk());
      mapa.put("intCuentaPk", pId.getIntCuentaPk());
      mapa.put("intItemCuentaConcepto", pId.getIntItemCuentaConcepto());
      mapa.put("intItemCtaCptoDet", pId.getIntItemCtaCptoDet());

      lista = dao.getListaConceptoPagoPorCuentaConceptoDet(mapa);

    } catch (DAOException e) {
      throw new BusinessException(e);
    } catch (Exception e) {
      throw new BusinessException(e);
    }
    return lista;
  }