public void preencheCampos(areasBean ab) {
   Object codigoArea = ab.getCodarea();
   String codA = "" + codigoArea;
   campoCod.setText(codA);
   Object codigoSetor = ab.getCodsetor();
   String codS = "" + codigoSetor;
   campoCodSetor.setText(codS);
   campoDescicao.setText(ab.getDescricao());
   campoDataAltera.setText(ab.getDataAltera());
   campoUserAltera.setText(ab.getUserAltera());
   campoDataInclusao.setText(ab.getUserDataInclusao());
   campoUserInclusao.setText(ab.getUserInclusao());
   Object codsu = ab.getCodSupervisor();
   int nomeS = Integer.parseInt(codS);
   String codSuper = "" + codsu;
   campoCodSup.setText(codSuper);
   campoNomeSup.setText(ps.selectComboFuncionario(nomeS));
   campoFiscaisL.setText(ab.getFiscaisL());
   campoFiscaisR.setText(ab.getFiscaisR());
   campoMunicipio.setText(ab.getMunicipio());
   campoExtensao.setText(ab.getExtensao());
   campoSigla.setText(ab.getSigla());
   campoRuas.setText(ab.getRuas());
 }
 public void preencheCamposAreas(EntityManagerFactory factory, EntityManager manager, int cod) {
   codUpdate = cod;
   areasBean ab = new areasBean();
   manager.getTransaction().begin();
   Areas a = manager.getReference(Areas.class, cod);
   ab.setCodarea(a.getCodarea());
   ab.setCodsetor(a.getCodareasetor());
   ab.setDescricao(a.getDescricao());
   ab.setMunicipio(a.getMunicipio());
   ab.setSigla(a.getSigla());
   ab.setCodSupervisor(a.getCodsupervisor());
   ab.setDataAltera(a.getDataAltera());
   ab.setUserAltera(a.getUserAltera());
   ab.setUserInclusao(a.getUserInclusao());
   ab.setUserDataInclusao(a.getDataInclusao());
   ab.setExtensao(a.getExtensao());
   ab.setFiscaisL(a.getFiscaislimpeza());
   ab.setFiscaisR(a.getFiscaisrecolha());
   ab.setRuas(a.getRuas());
   preencheCampos(ab);
   manager.close();
   factory.close();
 }