/*
|
* 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.fdxconsultation.model.remoteaction;
|
|
import com.megatim.fdxcommons.model.base.BaseEntity;
|
import com.megatim.fdxcommons.model.enumeration.RemoteTypeAction;
|
import com.megatim.fdxcommons.model.remoteaction.RemoteConfigurationId;
|
import com.megatim.fdxcommons.model.search.CriteriaEntitySearch;
|
import java.io.Serializable;
|
import java.util.HashSet;
|
import java.util.Set;
|
import javax.persistence.CascadeType;
|
import javax.persistence.Entity;
|
import javax.persistence.EnumType;
|
import javax.persistence.Enumerated;
|
import javax.persistence.FetchType;
|
import javax.persistence.Id;
|
import javax.persistence.IdClass;
|
import javax.persistence.OneToMany;
|
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotNull;
|
import lombok.Getter;
|
import lombok.NoArgsConstructor;
|
import lombok.Setter;
|
|
/**
|
*
|
* @author ASUS
|
*/
|
@Getter
|
@Setter
|
@NoArgsConstructor
|
@IdClass(RemoteConfigurationId.class)
|
@Entity
|
public class RemoteConfiguration extends BaseEntity implements Serializable {
|
|
@Id
|
@NotEmpty(message = "Le type de fichier est obligatoire")
|
@CriteriaEntitySearch(libelle = "Type de fichier", rang = 5)
|
private String codeTypeFichier;
|
|
@Id
|
@NotEmpty(message = "Le participant est obligatoire")
|
@CriteriaEntitySearch(libelle = "Type de fichier")
|
private String codeParticipant;
|
|
@NotEmpty(message = "L'URL est obligatoire")
|
private String url;
|
|
@NotNull(message = "Le type d'action est obligatoire")
|
@Enumerated(EnumType.STRING)
|
@CriteriaEntitySearch(libelle = "Type d'action", rang = 7)
|
private RemoteTypeAction remoteTypeAction;//Type d'action à effectuer au niveau du endpoint du participant
|
|
@OneToMany(mappedBy = "configuration", fetch = FetchType.EAGER, cascade = CascadeType.ALL)
|
private Set<Planification> planifications = new HashSet<>();
|
}
|