1 package ecar.pojo;
2
3
4
5 import java.util.Date;
6 import java.util.HashSet;
7 import java.util.Set;
8 import javax.persistence.Column;
9 import javax.persistence.Entity;
10 import javax.persistence.FetchType;
11 import javax.persistence.GeneratedValue;
12 import javax.persistence.Id;
13 import javax.persistence.OneToMany;
14 import javax.persistence.Table;
15 import javax.persistence.Temporal;
16 import javax.persistence.TemporalType;
17 import org.hibernate.annotations.GenericGenerator;
18
19
20
21
22 @Entity
23 @Table(name = "TB_CRITERIO_CRI")
24 public class CriterioCri implements java.io.Serializable {
25
26 private Long codCri;
27 private String indAtivoCri;
28 private Date dataInclusaoCri;
29 private String descricaoCri;
30 private Set<ItemEstrutCriterioIettc> itemEstrutCriterioIettcs = new HashSet<ItemEstrutCriterioIettc>(0);
31 private Set<HistoricoIettcH> historicoIettcHs = new HashSet<HistoricoIettcH>(0);
32
33 public CriterioCri() {
34 }
35
36 public CriterioCri(String indAtivoCri, Date dataInclusaoCri, String descricaoCri, Set<ItemEstrutCriterioIettc> itemEstrutCriterioIettcs, Set<HistoricoIettcH> historicoIettcHs) {
37 this.indAtivoCri = indAtivoCri;
38 this.dataInclusaoCri = dataInclusaoCri;
39 this.descricaoCri = descricaoCri;
40 this.itemEstrutCriterioIettcs = itemEstrutCriterioIettcs;
41 this.historicoIettcHs = historicoIettcHs;
42 }
43
44 @GenericGenerator(name = "generator", strategy = "increment")
45 @Id
46 @GeneratedValue(generator = "generator")
47 @Column(name = "COD_CRI", nullable = false)
48 public Long getCodCri() {
49 return this.codCri;
50 }
51
52 public void setCodCri(Long codCri) {
53 this.codCri = codCri;
54 }
55
56 @Column(name = "IND_ATIVO_CRI", length = 1)
57 public String getIndAtivoCri() {
58 return this.indAtivoCri;
59 }
60
61 public void setIndAtivoCri(String indAtivoCri) {
62 this.indAtivoCri = indAtivoCri;
63 }
64
65 @Temporal(TemporalType.TIMESTAMP)
66 @Column(name = "DATA_INCLUSAO_CRI", length = 7)
67 public Date getDataInclusaoCri() {
68 return this.dataInclusaoCri;
69 }
70
71 public void setDataInclusaoCri(Date dataInclusaoCri) {
72 this.dataInclusaoCri = dataInclusaoCri;
73 }
74
75 @Column(name = "DESCRICAO_CRI", length = 2000)
76 public String getDescricaoCri() {
77 return this.descricaoCri;
78 }
79
80 public void setDescricaoCri(String descricaoCri) {
81 this.descricaoCri = descricaoCri;
82 }
83
84 @OneToMany(fetch = FetchType.LAZY, mappedBy = "criterioCri")
85 public Set<ItemEstrutCriterioIettc> getItemEstrutCriterioIettcs() {
86 return this.itemEstrutCriterioIettcs;
87 }
88
89 public void setItemEstrutCriterioIettcs(Set<ItemEstrutCriterioIettc> itemEstrutCriterioIettcs) {
90 this.itemEstrutCriterioIettcs = itemEstrutCriterioIettcs;
91 }
92
93 @OneToMany(fetch = FetchType.LAZY, mappedBy = "criterioCri")
94 public Set<HistoricoIettcH> getHistoricoIettcHs() {
95 return this.historicoIettcHs;
96 }
97
98 public void setHistoricoIettcHs(Set<HistoricoIettcH> historicoIettcHs) {
99 this.historicoIettcHs = historicoIettcHs;
100 }
101
102 }