while(resultado.next()) {
int id = resultado.getInt("ID");
String nome = resultado.getString("NOME");
String telefone = resultado.getString("TELEFONE");
String sexo = resultado.getString("SEXO");
Pessoa p = new Pessoa(id,nome, telefone, sexo.equals("M"));
lista.add(p);
}
return lista;
} catch (SQLException ex) {
throw new CadastroDAOException("Falha ao buscar.", ex);