public GestionCobranza getGestionCobranzaPorPK(GestionCobranza o) throws BusinessException {
    log.info(
        "-----------------------Debugging GestionCobranzaBO.getGestionCobranzaPorPK-----------------------------");
    List<GestionCobranza> lista = null;
    GestionCobranza GestionCobranza = null;

    log.info("Seteando los parametros de busqueda de getGestionCobranzaPorPK : ");
    log.info("-------------------------------------------------");
    HashMap map = new HashMap();

    map.put("intIdEmpresa", o.getId().getIntPersEmpresaGestionPK());
    map.put("intItemGestionCobranza", o.getId().getIntItemGestionCobranza());

    try {
      lista = dao.getGestionCobranzaPorPK(map);
      if (lista != null) {
        if (lista.size() == 1) {
          GestionCobranza = lista.get(0);
        } else if (lista.size() == 0) {
          GestionCobranza = null;
        } else {
          throw new BusinessException("Obtención de mas de un registro coincidente");
        }
      }
    } catch (DAOException e) {
      throw new BusinessException(e);
    } catch (Exception e) {
      throw new BusinessException(e);
    }
    return GestionCobranza;
  }
  public List<GestionCobranza> getListaGestionCobranza(Object o) throws BusinessException {
    log.info(
        "-----------------------Debugging GestionCobranzaBO.getListaGestionCobranza-----------------------------");
    List<GestionCobranza> lista = null;

    log.info("Seteando los parametros de busqueda de Gestion Cobranza: ");
    log.info("-------------------------------------------------");
    GestionCobranza gestionCobranza = (GestionCobranza) o;
    HashMap map = new HashMap();

    map.put("intPersEmpresaGestionPK", gestionCobranza.getId().getIntPersEmpresaGestionPK());
    map.put("intIdPersonaGestor", gestionCobranza.getIntIdPersonaGestor());
    map.put("intTipoGestionCobCod", gestionCobranza.getIntTipoGestionCobCod());
    map.put("dtFechaGestionIni", gestionCobranza.getDtFechaGestionIni());
    map.put("dtFechaGestionFin", gestionCobranza.getDtFechaGestionFin());
    map.put("intEstado", gestionCobranza.getIntEstado());

    try {
      lista = dao.getListaGestionCobranza(map);
    } catch (DAOException e) {
      throw new BusinessException(e);
    } catch (Exception e) {
      throw new BusinessException(e);
    }
    return lista;
  }
  public List<GestionCobranzaEnt> grabarDinamicoListaGestionCobranzaEnt(GestionCobranza o)
      throws BusinessException {
    List<GestionCobranzaEnt> listaGestionCobranzaEnt = null;
    GestionCobranzaEnt gestionCobranzaEnt = null;
    GestionCobranzaEnt gestionCobranzaEntTemp = null;

    try {
      listaGestionCobranzaEnt = o.getListaGestionCobranzaEnt();
      for (int i = 0; i < listaGestionCobranzaEnt.size(); i++) {
        gestionCobranzaEnt = listaGestionCobranzaEnt.get(i);
        log.info("GestionCobranzaEnt.intEstadoCod: " + gestionCobranzaEnt.getIntEstadoCod());
        log.info("GestionCobranzaEnt.intNivel: " + gestionCobranzaEnt.getIntNivel());
        log.info("GestionCobranzaEnt.id: " + gestionCobranzaEnt.getId());
        if (gestionCobranzaEnt.getId().getIntItemGestCobrEntidad() == null) {
          gestionCobranzaEnt.setId(new GestionCobranzaEntId());
          gestionCobranzaEnt
              .getId()
              .setIntPersEmpresaGestion(o.getId().getIntPersEmpresaGestionPK());
          gestionCobranzaEnt
              .getId()
              .setIntItemGestionCobranza(o.getId().getIntItemGestionCobranza());
          gestionCobranzaEnt.setIntEstadoCod(Constante.PARAM_T_ESTADOUNIVERSAL_ACTIVO);
          boGestionCobranzaEnt.grabarGestionCobranzaEnt(gestionCobranzaEnt);
        } else {
          gestionCobranzaEntTemp =
              boGestionCobranzaEnt.getGestionCobranzaEntPorPK(gestionCobranzaEnt);
          if (gestionCobranzaEntTemp == null) {
            gestionCobranzaEnt = boGestionCobranzaEnt.grabarGestionCobranzaEnt(gestionCobranzaEnt);
          } else {
            gestionCobranzaEnt =
                boGestionCobranzaEnt.modificarGestionCobranzaEnt(gestionCobranzaEnt);
          }
        }
        log.info(
            "GestionCobranzaEnt.id.intItemGestCobrEntidadPK: "
                + gestionCobranzaEnt.getId().getIntItemGestCobrEntidad());
      }
    } catch (BusinessException e) {
      throw e;
    } catch (Exception e) {
      throw new BusinessException(e);
    }
    return listaGestionCobranzaEnt;
  }