logger.debug(pst);
int nb_result = 0;
// 3 R�cup�ration des champs de la base et affectation � l'objet DemandeConges
while(resultSet.next()) {
nb_result++;
Employe employe = new Employe();
employe = employes.get(Integer.parseInt(resultSet.getString("employe.ID")));
if (employe == null) {
employe = new Employe();
employe.setEmail(resultSet.getString("employe.email"));
employe.setIdUtilisateur(Integer.parseInt(resultSet.getString("employe.ID")));
employe.setLogin(resultSet.getString("employe.login"));
employe.setNom(resultSet.getString("employe.nom"));
employe.setPassword(resultSet.getString("employe.password"));
employe.setPrenom(resultSet.getString("employe.prenom"));
}
DemandeConges demande = new DemandeConges();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date dateDebut = new Date();
dateDebut = formatter.parse(resultSet.getString("conges.dateDebut"));
Date dateFin = new Date();
dateFin = formatter.parse(resultSet.getString("conges.dateFin"));
Date dateEmission = new Date();
dateEmission = formatter.parse(resultSet.getString("conges.dateEmission"));
demande.setIdDemande(Integer.valueOf(resultSet.getString("conges.ID")));
demande.setIdEmploye(Integer.valueOf(resultSet.getString("conges.ID_employe")));
demande.setDateDebut(dateDebut);
demande.setDateFin(dateFin);
demande.setEtat(Etat.valueOf(resultSet.getString("conges.etat")));
demande.setTypeConge(resultSet.getString("conges.typeConge"));
demande.setDureeConge(Integer.valueOf(resultSet.getString("conges.dureeConge")));
demande.setDateEmission(dateEmission);
demande.setCommentaire(resultSet.getString("conges.commentaire"));
Collection<DemandeConges> demandesconges = employe.getCollectionDemandeConges();
demandesconges.add(demande);
employe.setCollectionDemandeConges(demandesconges);
employes.put(employe.getIdUtilisateur(),employe);
}
logger.debug("NB de lignes : "+nb_result);