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_BENEFICIARIO_BNF")
24 public class BeneficiarioBnf implements java.io.Serializable {
25
26 private Long codBnf;
27 private String indAtivoBnf;
28 private Date dataInclusaoBnf;
29 private String nomeBnf;
30 private Set<ItemEstrtBenefIettb> itemEstrtBenefIettbs = new HashSet<ItemEstrtBenefIettb>(0);
31 private Set<HistoricoIettbH> historicoIettbHs = new HashSet<HistoricoIettbH>(0);
32
33 public BeneficiarioBnf() {
34 }
35
36 public BeneficiarioBnf(String indAtivoBnf, Date dataInclusaoBnf, String nomeBnf, Set<ItemEstrtBenefIettb> itemEstrtBenefIettbs, Set<HistoricoIettbH> historicoIettbHs) {
37 this.indAtivoBnf = indAtivoBnf;
38 this.dataInclusaoBnf = dataInclusaoBnf;
39 this.nomeBnf = nomeBnf;
40 this.itemEstrtBenefIettbs = itemEstrtBenefIettbs;
41 this.historicoIettbHs = historicoIettbHs;
42 }
43
44 @GenericGenerator(name = "generator", strategy = "increment")
45 @Id
46 @GeneratedValue(generator = "generator")
47 @Column(name = "COD_BNF", nullable = false)
48 public Long getCodBnf() {
49 return this.codBnf;
50 }
51
52 public void setCodBnf(Long codBnf) {
53 this.codBnf = codBnf;
54 }
55
56 @Column(name = "IND_ATIVO_BNF", length = 1)
57 public String getIndAtivoBnf() {
58 return this.indAtivoBnf;
59 }
60
61 public void setIndAtivoBnf(String indAtivoBnf) {
62 this.indAtivoBnf = indAtivoBnf;
63 }
64
65 @Temporal(TemporalType.TIMESTAMP)
66 @Column(name = "DATA_INCLUSAO_BNF", length = 7)
67 public Date getDataInclusaoBnf() {
68 return this.dataInclusaoBnf;
69 }
70
71 public void setDataInclusaoBnf(Date dataInclusaoBnf) {
72 this.dataInclusaoBnf = dataInclusaoBnf;
73 }
74
75 @Column(name = "NOME_BNF", length = 2000)
76 public String getNomeBnf() {
77 return this.nomeBnf;
78 }
79
80 public void setNomeBnf(String nomeBnf) {
81 this.nomeBnf = nomeBnf;
82 }
83
84 @OneToMany(fetch = FetchType.LAZY, mappedBy = "beneficiarioBnf")
85 public Set<ItemEstrtBenefIettb> getItemEstrtBenefIettbs() {
86 return this.itemEstrtBenefIettbs;
87 }
88
89 public void setItemEstrtBenefIettbs(Set<ItemEstrtBenefIettb> itemEstrtBenefIettbs) {
90 this.itemEstrtBenefIettbs = itemEstrtBenefIettbs;
91 }
92
93 @OneToMany(fetch = FetchType.LAZY, mappedBy = "beneficiarioBnf")
94 public Set<HistoricoIettbH> getHistoricoIettbHs() {
95 return this.historicoIettbHs;
96 }
97
98 public void setHistoricoIettbHs(Set<HistoricoIettbH> historicoIettbHs) {
99 this.historicoIettbHs = historicoIettbHs;
100 }
101
102 }