예제 #1
0
  public List<ProvedorAcessoTO> ListaTodosProvedorAcesso() throws BusinessException {
    ProvedorAcessoDelegate prDelegate;
    List<ProvedorAcessoTO> provedorAcess = new ArrayList<ProvedorAcessoTO>();
    prDelegate = ProvedorAcessoDelegate.getInstance();
    for (BaseTO tipoAcessoTO : prDelegate.readAll()) {
      // não exibir tipo acesso NET
      if (!((ProvedorAcessoTO) tipoAcessoTO).getDescricao().equals("NET")) {
        provedorAcess.add((ProvedorAcessoTO) tipoAcessoTO);
      }
    }

    return provedorAcess;
  }
예제 #2
0
  public void preencheTOsdeCombo(AcessoTO acessoTO, AcessoFormBean formulario)
      throws NumberFormatException, DelegateException, BusinessException {
    if (Util.isNumeric(acessoTO.getCodigoCaracteristicaInterface()))
      formulario.setCaracteristicaInterfaceTO(
          (CaracteristicaInterfaceTO)
              CaracteristicaInterfaceDelegate.getInstance()
                  .read(Long.valueOf(acessoTO.getCodigoCaracteristicaInterface())));
    else formulario.setCaracteristicaInterfaceTO(new CaracteristicaInterfaceTO());

    if (Util.isNumeric(acessoTO.getCodigoInterface()))
      formulario.setInterfaceTO(
          (InterfaceTO)
              InterfaceDelegate.getInstance().read(Long.valueOf(acessoTO.getCodigoInterface())));
    else formulario.setInterfaceTO(new InterfaceTO());

    if (Util.isNumeric(acessoTO.getCodigoInterfaceSSA()))
      formulario.setInterfaceTO(
          (InterfaceTO)
              InterfaceDelegate.getInstance().read(Long.valueOf(acessoTO.getCodigoInterfaceSSA())));
    else formulario.setInterfaceTO(new InterfaceTO());

    if (Util.isNumeric(acessoTO.getCodigoTipoAcesso()))
      formulario.setTipoAcessoTO(
          (TipoAcessoTO)
              TipoAcessoDelegate.getInstance().read(Long.valueOf(acessoTO.getCodigoTipoAcesso())));
    else formulario.setTipoAcessoTO(new TipoAcessoTO());

    if (Util.isNumeric(acessoTO.getCodigoTipoAcessoSSA()))
      formulario.setTipoAcessoTO(
          (TipoAcessoTO)
              TipoAcessoDelegate.getInstance()
                  .read(Long.valueOf(acessoTO.getCodigoTipoAcessoSSA())));
    else formulario.setTipoAcessoTO(new TipoAcessoTO());

    if (Util.isNumeric(acessoTO.getCodigoFornecedor()))
      formulario.setProvedorAcessoTO(
          (ProvedorAcessoTO)
              ProvedorAcessoDelegate.getInstance()
                  .read(Long.valueOf(acessoTO.getCodigoFornecedor())));
    else formulario.setProvedorAcessoTO(new ProvedorAcessoTO());
  }