From 23a46b4be35277e06ec89f48730eeb694e686be8 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 15:40:06 +0000
Subject: [PATCH] add fdx-commons and fdx-consultation

---
 fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/database/queries/UpdateDataProductionQuery.java |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/database/queries/UpdateDataProductionQuery.java b/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/database/queries/UpdateDataProductionQuery.java
new file mode 100644
index 0000000..06a591b
--- /dev/null
+++ b/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/database/queries/UpdateDataProductionQuery.java
@@ -0,0 +1,35 @@
+package com.megatim.fdxcommons.tools.database.queries;
+
+import com.megatim.fdxcommons.model.dataproduction.CommonDataProduction;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+/**
+ *
+ * @author ASUS
+ */
+public class UpdateDataProductionQuery {
+
+    private final Connection connection;
+    private final CommonDataProduction dataProduction;
+
+    public UpdateDataProductionQuery(CommonDataProduction dataProduction, Connection connection) {
+        this.connection = connection;
+        this.dataProduction = dataProduction;
+    }
+
+    public void execute() throws SQLException {
+        try (PreparedStatement statement = connection.prepareStatement(queryString())) {
+            statement.setString(1, dataProduction.getStatutDataProduction().name());
+            statement.setLong(2, dataProduction.getNbreElements());
+            statement.setLong(3, dataProduction.getId());
+            statement.executeUpdate();
+        }
+    }
+
+    private String queryString() {
+        String query = "UPDATE dataproduction SET statutdataproduction  = ? , nbreelements = ? WHERE id = ?";
+        return query;
+    }
+}

--
Gitblit v1.10.0