1 package ecar.pojo;
2
3
4
5 import java.util.Date;
6 import javax.persistence.Column;
7 import javax.persistence.Entity;
8 import javax.persistence.FetchType;
9 import javax.persistence.GeneratedValue;
10 import javax.persistence.Id;
11 import javax.persistence.JoinColumn;
12 import javax.persistence.ManyToOne;
13 import javax.persistence.Table;
14 import org.hibernate.annotations.GenericGenerator;
15
16
17
18
19 @Entity
20 @Table(name = "TB_HISTORICO_IETTCH")
21 public class HistoricoIettcH implements java.io.Serializable {
22
23 private Long codIettCH;
24 private Date dataUltManutencao;
25 private CriterioCri criterioCri;
26 private ItemEstruturaIett itemEstruturaIett;
27 private UsuarioUsu usuManutencao;
28 private HistoricoMaster historicoMaster;
29
30 public HistoricoIettcH() {
31 }
32
33 public HistoricoIettcH(Date dataUltManutencao, CriterioCri criterioCri, ItemEstruturaIett itemEstruturaIett, UsuarioUsu usuManutencao, HistoricoMaster historicoMaster) {
34 this.dataUltManutencao = dataUltManutencao;
35 this.criterioCri = criterioCri;
36 this.itemEstruturaIett = itemEstruturaIett;
37 this.usuManutencao = usuManutencao;
38 this.historicoMaster = historicoMaster;
39 }
40
41 @GenericGenerator(name = "generator", strategy = "increment")
42 @Id
43 @GeneratedValue(generator = "generator")
44 @Column(name = "COD_IETTCH", nullable = false)
45 public Long getCodIettCH() {
46 return this.codIettCH;
47 }
48
49 public void setCodIettCH(Long codIettCH) {
50 this.codIettCH = codIettCH;
51 }
52
53 @Column(name = "data_ult_manutencao")
54 public Date getDataUltManutencao() {
55 return this.dataUltManutencao;
56 }
57
58 public void setDataUltManutencao(Date dataUltManutencao) {
59 this.dataUltManutencao = dataUltManutencao;
60 }
61
62 @ManyToOne(fetch = FetchType.LAZY)
63 @JoinColumn(name = "cod_cri")
64 public CriterioCri getCriterioCri() {
65 return this.criterioCri;
66 }
67
68 public void setCriterioCri(CriterioCri criterioCri) {
69 this.criterioCri = criterioCri;
70 }
71
72 @ManyToOne(fetch = FetchType.LAZY)
73 @JoinColumn(name = "COD_IETT")
74 public ItemEstruturaIett getItemEstruturaIett() {
75 return this.itemEstruturaIett;
76 }
77
78 public void setItemEstruturaIett(ItemEstruturaIett itemEstruturaIett) {
79 this.itemEstruturaIett = itemEstruturaIett;
80 }
81
82 @ManyToOne(fetch = FetchType.LAZY)
83 @JoinColumn(name = "COD_USU_MANUTENCAO")
84 public UsuarioUsu getUsuManutencao() {
85 return this.usuManutencao;
86 }
87
88 public void setUsuManutencao(UsuarioUsu usuManutencao) {
89 this.usuManutencao = usuManutencao;
90 }
91
92 @ManyToOne(fetch = FetchType.LAZY)
93 @JoinColumn(name = "COD_MAH")
94 public HistoricoMaster getHistoricoMaster() {
95 return this.historicoMaster;
96 }
97
98 public void setHistoricoMaster(HistoricoMaster historicoMaster) {
99 this.historicoMaster = historicoMaster;
100 }
101
102 }