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/Noeud.java |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 111 insertions(+), 0 deletions(-)

diff --git a/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/Noeud.java b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/Noeud.java
new file mode 100644
index 0000000..b0f3f2b
--- /dev/null
+++ b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/Noeud.java
@@ -0,0 +1,111 @@
+package com.megatim.fdxcommons.model.referentiel;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Set;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToMany;
+import javax.persistence.ManyToOne;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import com.megatim.fdxcommons.model.search.CriteriaEntitySearch;
+
+/**
+ *
+ * @author ASUS
+ */
+@Entity
+@Getter
+@Setter
+@NoArgsConstructor
+@XmlRootElement(name = "noeuds")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Noeud implements Serializable {
+
+    @Id
+    @NotEmpty(message = "Code obligatoire")
+    @Size(min = 4, message = "Le format du code est incorrect")
+    @Size(max = 16, message = "Le format du code est incorrect")
+    @CriteriaEntitySearch(libelle = "Code", rang = 1)
+    private String code;
+
+    @NotEmpty(message = "Libellé obligatoire")
+    @CriteriaEntitySearch(libelle = "Libellé", rang = 2)
+    private String libelle;
+
+    @NotNull(message = "Le noeud doit être associé à un référentiel en préparation")
+    @ManyToOne
+    @CriteriaEntitySearch(libelle = "Référentiel", fieldName = "referentiel.version", rang = 3)
+    private Referentiel referentiel;
+
+    @NotNull(message = "Participant obligatoire")
+    @ManyToOne
+    @CriteriaEntitySearch(libelle = "Participant", fieldName = "participant.code", rang = 4)
+    private Participant participant;
+
+    @XmlTransient
+    @ManyToMany(mappedBy = "noeuds")
+    @JsonIgnore
+    private Set<GroupeNoeud> groupeNoeuds;
+
+    @XmlTransient
+    @ManyToMany(mappedBy = "noeudsEnvoi")
+    @JsonIgnore
+    private Set<Routage> routageEnvois = new HashSet<>();
+
+    @XmlTransient
+    @ManyToMany(mappedBy = "noeudsReception")
+    @JsonIgnore
+    private Set<Routage> routageReceptions = new HashSet<>();
+
+    @XmlJavaTypeAdapter(LocalDateTimeAdapter.class)
+    private LocalDateTime dateCreation;
+
+    @XmlJavaTypeAdapter(LocalDateTimeAdapter.class)
+    private LocalDateTime dateMiseAjour;
+
+    private String createBy;
+
+    private String lastModifiedBy;
+
+    @Override
+    public String toString() {
+        return this.getCode() + " - " + this.getLibelle();
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 53 * hash + Objects.hashCode(this.code);
+        return hash;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof Noeud)) {
+            return false;
+        }
+        Noeud other = (Noeud) obj;
+        if (this.getCode() != null && !this.getCode().equals(other.getCode())) {
+            return false;
+        }
+        return true;
+    }
+
+}

--
Gitblit v1.10.0