From b3d0580439b9a00c7eb918085de1694151066004 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 16:02:49 +0000
Subject: [PATCH] rename packages
---
fdx_convert/src/main/java/com/megatim/fdxconvert/dao/TacheDAO.java | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/fdx_convert/src/main/java/com/megatim/fdxconvert/dao/TacheDAO.java b/fdx_convert/src/main/java/com/megatim/fdxconvert/dao/TacheDAO.java
new file mode 100644
index 0000000..6c0f436
--- /dev/null
+++ b/fdx_convert/src/main/java/com/megatim/fdxconvert/dao/TacheDAO.java
@@ -0,0 +1,43 @@
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package com.megatim.fdxconvert.dao;
+
+import com.megatim.fdxconvert.model.Tache;
+import com.megatim.fdxconvert.model.TypeFichier;
+import java.util.List;
+import java.util.Optional;
+import org.hibernate.Session;
+import org.hibernate.query.Query;
+
+/**
+ *
+ * @author STEPHANIE
+ */
+public class TacheDAO {
+
+ private TacheDAO() {
+
+ }
+
+ public static Optional<Tache> getTacheByLibelle(String libelle) {
+
+ try ( Session session = HibernateUtil.getSessionFactory().openSession()) {
+ Query query = session.createQuery("select t from Tache t where t.libelle = :libelle");
+ query.setParameter("libelle", libelle);
+
+ return query.uniqueResultOptional();
+ }
+ }
+
+ public static List<Tache> getTacheByTypeFichier(TypeFichier typeFichier) {
+
+ try ( Session session = HibernateUtil.getSessionFactory().openSession()) {
+ Query query = session.createQuery("select t from Tache t where t.typeFichier.code = :codeTypeFichier");
+ query.setParameter("codeTypeFichier", typeFichier.getCode());
+
+ return query.getResultList();
+ }
+ }
+}
--
Gitblit v1.10.0