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/referentiel/historique/ReferentielIntegrationHistorique.java | 75 +++++++++++++++++++++++++++++++++++++
1 files changed, 75 insertions(+), 0 deletions(-)
diff --git a/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/historique/ReferentielIntegrationHistorique.java b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/historique/ReferentielIntegrationHistorique.java
new file mode 100644
index 0000000..5f1e936
--- /dev/null
+++ b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/historique/ReferentielIntegrationHistorique.java
@@ -0,0 +1,75 @@
+package com.megatim.fdxcommons.model.referentiel.historique;
+
+import java.io.Serializable;
+import java.util.Objects;
+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.IdClass;
+import javax.persistence.JoinColumn;
+import javax.validation.constraints.NotEmpty;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+/**
+ *
+ * @author ASUS
+ */
+@Getter
+@Setter
+@Entity
+@IdClass(ReferentielIntegrationHistoriqueId.class)
+@NoArgsConstructor
+@AllArgsConstructor
+public class ReferentielIntegrationHistorique implements Serializable {
+
+ @Id
+ @NotEmpty(message = "Le code du type fichier est obligatoire")
+ private String codeTypeFichier;
+
+ @Id
+ @NotEmpty(message = "La version du référentiel est obligatoire")
+ private String referentielVersion;
+
+ @ElementCollection(targetClass = String.class, fetch = FetchType.EAGER)
+ @CollectionTable(
+ name = "ref_int_historique_depending_refs", // Name of the table for the collection
+ joinColumns = {@JoinColumn(name = "codetypefichier"), @JoinColumn(name = "referentielversion")} // Foreign key column in the collection table
+ )
+ private Set<String> dependingReferentiels;
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 67 * hash + Objects.hashCode(this.codeTypeFichier);
+ hash = 67 * hash + Objects.hashCode(this.referentielVersion);
+ hash = 67 * hash + Objects.hashCode(this.dependingReferentiels);
+ return hash;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final ReferentielIntegrationHistorique other = (ReferentielIntegrationHistorique) obj;
+
+ if (other.getCodeTypeFichier() != null && other.getReferentielVersion() != null) {
+ return other.getCodeTypeFichier().equals(this.codeTypeFichier) && other.getReferentielVersion().equals(this.referentielVersion);
+ } else {
+ return false;
+ }
+ }
+
+}
--
Gitblit v1.10.0