Skip to content

Commit

Permalink
Merge pull request #111 from abes-esr/develop
Browse files Browse the repository at this point in the history
develop to main
  • Loading branch information
pierre-maraval authored Dec 12, 2024
2 parents 29e9025 + 4993d46 commit 209a6eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ public class DemandeExemp extends Demande{
@Column(name = "LISTE_ZONES", length = 2000)
private String listeZones;

@OneToMany(mappedBy = "demandeExemp", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
private Set<JournalDemandeExemp> journalDemandes;

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "DEM_INDEX_RECHERCHE")
private IndexRecherche indexRecherche;

@OneToMany(mappedBy = "demandeExemp", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
private Set<LigneFichierExemp> ligneFichierExemps;

@OneToMany(mappedBy = "demandeExemp", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
private Set<JournalDemandeExemp> journalDemandes;

public DemandeExemp(Integer numDemande) {
super(numDemande);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package fr.abes.item.core.entities.item;

import fr.abes.item.core.constant.TYPE_DEMANDE;
import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.Set;

@Entity
@Table(name = "DEMANDE_RECOUV")
Expand All @@ -21,6 +19,12 @@ public class DemandeRecouv extends Demande {
@JoinColumn(name = "DEM_INDEX_RECHERCHE")
private IndexRecherche indexRecherche;

@OneToMany(mappedBy = "demandeRecouv", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
private Set<LigneFichierRecouv> ligneFichierRecouvs;

@Getter @Setter @OneToMany(mappedBy = "demandeRecouv", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
private Set<JournalDemandeRecouv> journalDemandeRecouvs;

public DemandeRecouv(@NotNull String rcr, Date dateCreation, Date dateModification, @NotNull EtatDemande etatDemande, String commentaire, Utilisateur utilisateur, IndexRecherche indexRecherche) {
super(rcr, dateCreation, dateModification, etatDemande, commentaire, utilisateur);
this.indexRecherche = indexRecherche;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public TYPE_DEMANDE getTypeDemande() {
@Getter @Setter @OneToMany(mappedBy = "demandeSupp", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
private Set<LigneFichierSupp> ligneFichierSupps;

@Getter @Setter @OneToMany(mappedBy = "demandeSupp", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
private Set<JournalDemandeSupp> journalDemandeSupps;

public DemandeSupp(String rcr, Date dateCreation, Date dateModification, TYPE_SUPPRESSION typeSuppression,
String comment, EtatDemande etatDemande, Utilisateur utilisateur) {
super(rcr, dateCreation, dateModification, etatDemande, comment, utilisateur);
Expand Down

0 comments on commit 209a6eb

Please sign in to comment.