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/InsertDataProductionInDataProductionToDeleteQuery.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/InsertDataProductionInDataProductionToDeleteQuery.java b/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/database/queries/InsertDataProductionInDataProductionToDeleteQuery.java
new file mode 100644
index 0000000..420a9da
--- /dev/null
+++ b/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/database/queries/InsertDataProductionInDataProductionToDeleteQuery.java
@@ -0,0 +1,35 @@
+package com.megatim.fdxcommons.tools.database.queries;
+
+import com.megatim.fdxcommons.tools.database.contrat.QueryMetaData;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+
+/**
+ *
+ * @author ASUS
+ */
+public class InsertDataProductionInDataProductionToDeleteQuery implements QueryMetaData<Void> {
+
+ private final Connection connection;
+ private final Long dataProductionId;
+
+ public InsertDataProductionInDataProductionToDeleteQuery(Connection connection, Long dataProductionId) {
+ this.connection = connection;
+ this.dataProductionId = dataProductionId;
+ }
+
+ @Override
+ public Void execute() throws Exception {
+ if (dataProductionId != null && dataProductionId > 0) {
+ String query = "INSERT INTO dataproductiontodelete(id, datecreation) values (?,?)";
+ try (PreparedStatement statement = connection.prepareStatement(query);) {
+ statement.setLong(1, dataProductionId);
+ statement.setTimestamp(2, Timestamp.valueOf(LocalDateTime.now()));
+ statement.executeUpdate();
+ }
+ }
+ return null;
+ }
+}
--
Gitblit v1.10.0