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
| package com.edf.ftn.data.vo.reclamation;
import java.io.Serializable;
import java.util.GregorianCalendar;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.BatchSize;
import org.springframework.context.annotation.Lazy;
import com.edf.ftn.data.vo.contrat.ContratVO;
import com.edf.ftn.data.vo.contrat.ProducteurVO;
import com.edf.ftn.data.vo.facture.FactureVO;
@Entity
@Table(name = "RECLAMATION_RCL")
@BatchSize(size=10)
public class ReclamationVO implements Serializable {
//~ Variables statiques et Initialiseurs de classe /////////////////////////
/** */
private static final long serialVersionUID = 1L;
//~ Variables membres //////////////////////////////////////////////////////
/** */
private String mNumeroReclamation;
/** contrat rattache. **/
private ContratVO mContrat;
/** facture rattache. **/
private FactureVO mFacture;
[...]
/** champ ajouter pour le traçage de l'auteur des modifications. */
private String mUserLastModif;
/** champ ajouter pour le traçage de l'auteur des modifications. */
private ProducteurVO mProducteur;
/** */
private List<CommentaireReclamationVO> mListCommentaires;
//~ Methodes ///////////////////////////////////////////////////////////////
/**
* @return the iD
*/
@Id
@Column(name = "RCL_NUM")
public final String getNumeroReclamation() {
return mNumeroReclamation;
}
/**
* @return the CNT_NUM
*/
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "CNT_NUM", nullable = false)
public ContratVO getContrat() {
return mContrat;
}
@Column(name = "RCL_CNT_CREA")
public String getNumCREA() {
return mNumCREA;
}
[...}
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "reclamation")
@JoinColumn(name = "RCL_NUM")
public List<CommentaireReclamationVO> getListCommentaires() {
return mListCommentaires;
}
} |
Partager