public void pesquisaFunc() { FuncionarioDao fdao = new FuncionarioDaoImp(); if (func.getNome() != null) { List<Funcionario> funcs = null; try { funcs = fdao.pesqFunc(func.getNome()); } catch (Exception ex) { Logger.getLogger(ImovelControle.class.getName()).log(Level.SEVERE, null, ex); } modelFunc = new ListDataModel(funcs); } }
public void pesquisaImovel() { ImovelDao idao = new ImovelDaoImp(); if (func.getNome() != null) { List<Imovel> imoveis = null; try { imoveis = idao.pesquisaImovelPorCodigo(imovel.getCodigo()); } catch (Exception ex) { Logger.getLogger(ImovelControle.class.getName()).log(Level.SEVERE, null, ex); } modelImovel = new ListDataModel(imoveis); } }