Kenmegne
7 days ago 23a46b4be35277e06ec89f48730eeb694e686be8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
package com.megatim.fdxcommons.model.referentiel;
 
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.megatim.fdxcommons.model.enumeration.StatutReferentiel;
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.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotBlank;
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.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 = "referentielList")
@XmlAccessorType(XmlAccessType.FIELD)
public class Referentiel implements Serializable {
 
    @Id
    @NotBlank(message = "La version est obligatoire")
    @CriteriaEntitySearch(libelle = "Version", rang = 1)
    private String version;
 
    @NotBlank(message = "La description est obligatoire")
    @CriteriaEntitySearch(libelle = "Description", rang = 2)
    private String description;
 
    @NotNull(message = "Le statut du référentiel est obligatoire")
    @Enumerated(EnumType.STRING)
    @CriteriaEntitySearch(libelle = "Statut Referentiel", rang = 3)
    private StatutReferentiel statutReferentiel;
 
    @OneToMany(mappedBy = "referentiel")
    @XmlTransient
    @JsonIgnore
    private Set<ExtensionFichier> extensionFichiers = new HashSet<>();
 
    @OneToMany(mappedBy = "referentiel")
    @XmlTransient
    @JsonIgnore
    private Set<ApplicationSource> applicationSources = new HashSet<>();
 
    @XmlTransient
    @OneToMany(mappedBy = "referentiel")
    @JsonIgnore
    private Set<Routage> routages = new HashSet<>();
 
    @XmlTransient
    @OneToMany(mappedBy = "referentiel")
    @JsonIgnore
    private Set<Pays> pays = new HashSet<>();
 
    @XmlTransient
    @OneToMany(mappedBy = "referentiel")
    @JsonIgnore
    private Set<Participant> participants = new HashSet<>();
 
    @XmlTransient
    @OneToMany(mappedBy = "referentiel")
    @JsonIgnore
    private Set<ValidateurFichierConfiguration> validateurFichierConfigurations = new HashSet<>();
 
    @XmlTransient
    @OneToMany(mappedBy = "referentiel")
    @JsonIgnore
    private Set<Noeud> noeuds = new HashSet<>();
 
    @XmlTransient
    @OneToMany(mappedBy = "referentiel")
    @JsonIgnore
    private Set<GroupeParticipant> groupeParticipants = new HashSet<>();
 
    @XmlTransient
    @OneToMany(mappedBy = "referentiel")
    @JsonIgnore
    private Set<GroupeNoeud> groupeNoeuds = new HashSet<>();
 
    @XmlJavaTypeAdapter(LocalDateTimeAdapter.class)
    private LocalDateTime dateCreation;
 
    @XmlJavaTypeAdapter(LocalDateTimeAdapter.class)
    private LocalDateTime dateMiseAjour;
 
    private String createBy;
 
    private String lastModifiedBy;
 
    @XmlJavaTypeAdapter(LocalDateTimeAdapter.class)
    private LocalDateTime dateGeneration;
 
    @Override
    public String toString() {
        return this.getVersion();
    }
 
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Referentiel other = (Referentiel) obj;
        if (this.getVersion() != null && !this.getVersion().equals(other.getVersion())) {
            return false;
        }
        return true;
    }
 
    @Override
    public int hashCode() {
        int hash = 3;
        hash = 61 * hash + Objects.hashCode(this.version);
        return hash;
    }
}