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/StructureLigne.java | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 113 insertions(+), 0 deletions(-)
diff --git a/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/StructureLigne.java b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/StructureLigne.java
new file mode 100644
index 0000000..64d3043
--- /dev/null
+++ b/fdx-commons/fdxcommons-model/src/main/java/com/megatim/fdxcommons/model/referentiel/StructureLigne.java
@@ -0,0 +1,113 @@
+/*
+ * 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.referentiel;
+
+import com.megatim.fdxcommons.model.enumeration.EtatIntegration;
+import com.megatim.fdxcommons.model.enumeration.TypeDonnee;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Objects;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.hibernate.validator.constraints.Range;
+
+/**
+ *
+ * @author ASUS
+ */
+@Entity
+@Getter
+@Setter
+@NoArgsConstructor
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
+public class StructureLigne implements Serializable {
+
+ @Id
+ @NotEmpty(message = "L'identifiant est obligatoire")
+ private String id;
+
+ @Range(min = 1, message = "La position doit être supérieure à 0")
+ private int position;
+
+ @NotEmpty(message = "Le code est obligatoire")
+ private String code;
+
+ private String designation;
+
+ @Range(min = 1, message = "La taille doit être supérieure à 0")
+ private int taille;
+
+ private String source;
+
+ private String formatDate;
+
+ @Enumerated(EnumType.STRING)
+ @NotNull(message = "Le type de données est obligatoire")
+ private TypeDonnee typeDonnee;
+
+ @NotNull(message = "Le validateur de fichier doit être indiqué")
+ @ManyToOne
+ private ValidateurFichier validateurFichier;
+
+ @ManyToOne
+ private ApplicationSource applicationSource;
+
+ @XmlJavaTypeAdapter(LocalDateTimeAdapter.class)
+ private LocalDateTime dateCreation;
+
+ @XmlJavaTypeAdapter(LocalDateTimeAdapter.class)
+ private LocalDateTime dateMiseAjour;
+
+ private String createBy;
+
+ private String lastModifiedBy;
+
+// @Enumerated(EnumType.STRING)
+// private EtatIntegration etatIntegration = EtatIntegration.NOUVEAU;
+
+ @Override
+ public String toString() {
+ return this.code + " - " + this.designation;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (!(obj instanceof StructureLigne)) {
+ return false;
+ }
+ final StructureLigne other = (StructureLigne) obj;
+ if (this.getId() != null && !this.getId().equals(other.getId())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 5;
+ hash = 47 * hash + Objects.hashCode(this.code);
+ return hash;
+ }
+
+}
--
Gitblit v1.10.0