@Override
 public RenduPuce getRenduPuceByIdResultat(int idResultat) {
   RenduPuce rendu = null;
   String sql = "SELECT r FROM RenduPuce r WHERE r.resultat.idResultat = :idResultat";
   Query query =
       HibernateUtil.getSession().createQuery(sql).setParameter("idResultat", idResultat);
   rendu = findOne(query);
   return rendu;
 }
  @Override
  public List<RenduPuce> getResultatPuceByIdPuce(Integer idPuce) {

    List<RenduPuce> resultats = null;
    String sql = "SELECT r FROM RenduPuce r WHERE r.puce.idPuce = :idPuce order by r.puce.idPuce";
    Query query = HibernateUtil.getSession().createQuery(sql).setParameter("idPuce", idPuce);
    resultats = findMany(query);
    return resultats;
  }
 @Override
 public List<Historique> getHistoInsert(Integer idPrelevement) {
   List<Historique> histo = null;
   String sql = "SELECT h FROM Historique h WHERE h.requete like :req order by h.date DESC";
   Query query =
       HibernateUtil.getSession()
           .createQuery(sql)
           .setParameter("req", "%idObjet=Prel-" + idPrelevement + "]");
   histo = findMany(query);
   return histo;
 }
 @Override
 public List<Historique> getSuppChampObj() {
   List<Historique> histo = null;
   String sql = "SELECT h FROM Historique h WHERE h.requete like :req";
   Query query =
       HibernateUtil.getSession()
           .createQuery(sql)
           .setParameter("req", "Suppression des champs de l'objetPrel%");
   histo = findMany(query);
   return histo;
 }