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-model/src/main/java/com/megatim/fdxcommons/model/dataproduction/metadata/ProductionMetaData.java | 74 +++++++++++++++++++++++++++++++++++++
1 files changed, 74 insertions(+), 0 deletions(-)
diff --git a/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/dataproduction/metadata/ProductionMetaData.java b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/dataproduction/metadata/ProductionMetaData.java
new file mode 100644
index 0000000..f6369ff
--- /dev/null
+++ b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/dataproduction/metadata/ProductionMetaData.java
@@ -0,0 +1,74 @@
+/*
+ * 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.fdxcommons.model.dataproduction.metadata;
+
+import com.megatim.fdxcommons.model.dataproduction.CommonDataProduction;
+import com.megatim.fdxcommons.model.dataproduction.metadata.constraint.ProductionMetaDataConstraint;
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CollectionTable;
+import javax.persistence.ElementCollection;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.Transient;
+import javax.validation.constraints.NotNull;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+/**
+ *
+ * @author ASUS
+ */
+@Getter
+@Setter
+@NoArgsConstructor
+@ProductionMetaDataConstraint
+@Entity
+public class ProductionMetaData implements Serializable {
+
+ @NotNull(message = "L'identifiant de la production est obligatoire")
+ @Id
+ private Long productionId;
+
+ @NotNull(message = "Le type de production est obligatoire")
+ private String dataProductionType;
+
+ private Long startIndex; //Index de debut dans le cas d'un ADD
+
+ @NotNull(message = "Le nombre d'éléments de la production est obligatoire")
+ private Long nbreElts;
+
+ @Transient
+ private CommonDataProduction dataProduction;
+
+ @ElementCollection(targetClass = Long.class, fetch = FetchType.EAGER)
+ @CollectionTable(
+ name = "productionMetaData_indexes", // Name of the table for the collection
+ joinColumns = {
+ @JoinColumn(name = "productionId")
+ } // Foreign key column in the collection table
+ )
+ private final Set<Long> indexes = new HashSet<>();//Liste des indexes dans le cas d'un Update
+
+ public ProductionMetaData(Long productionId, Long nbreElts) {
+ this.productionId = productionId;
+ this.nbreElts = nbreElts;
+ }
+
+ public ProductionMetaData(Long productionId, Long startIndex, Long nbreElts) {
+ this.productionId = productionId;
+ this.startIndex = startIndex;
+ this.nbreElts = nbreElts;
+ }
+
+ public ProductionMetaData(CommonDataProduction dataProduction) {
+ this.dataProduction = dataProduction;
+ }
+
+}
--
Gitblit v1.10.0