1 package ecar.pojo;
2
3
4
5 import java.util.HashSet;
6 import java.util.Set;
7 import javax.persistence.Column;
8 import javax.persistence.Entity;
9 import javax.persistence.FetchType;
10 import javax.persistence.GeneratedValue;
11 import javax.persistence.Id;
12 import javax.persistence.JoinColumn;
13 import javax.persistence.ManyToOne;
14 import javax.persistence.OneToMany;
15 import javax.persistence.Table;
16 import org.hibernate.annotations.GenericGenerator;
17
18
19
20
21 @Entity
22 @Table(name = "TB_FONTE_FON")
23 public class FonteFon implements java.io.Serializable {
24
25 private Long codFon;
26 private Long codigoIdentFon;
27 private String nomeFon;
28 private String indAtivoFon;
29 private RecursoRec recursoRec;
30 private Set<EfItemEstPrevisaoEfiep> efItemEstPrevisaoEfieps = new HashSet<EfItemEstPrevisaoEfiep>(0);
31
32 public FonteFon() {
33 }
34
35 public FonteFon(Long codigoIdentFon, String nomeFon, String indAtivoFon, RecursoRec recursoRec, Set<EfItemEstPrevisaoEfiep> efItemEstPrevisaoEfieps) {
36 this.codigoIdentFon = codigoIdentFon;
37 this.nomeFon = nomeFon;
38 this.indAtivoFon = indAtivoFon;
39 this.recursoRec = recursoRec;
40 this.efItemEstPrevisaoEfieps = efItemEstPrevisaoEfieps;
41 }
42
43 @GenericGenerator(name = "generator", strategy = "increment")
44 @Id
45 @GeneratedValue(generator = "generator")
46 @Column(name = "COD_FON", nullable = false)
47 public Long getCodFon() {
48 return this.codFon;
49 }
50
51 public void setCodFon(Long codFon) {
52 this.codFon = codFon;
53 }
54
55 @Column(name = "CODIGO_IDENT_FON", length = 10)
56 public Long getCodigoIdentFon() {
57 return this.codigoIdentFon;
58 }
59
60 public void setCodigoIdentFon(Long codigoIdentFon) {
61 this.codigoIdentFon = codigoIdentFon;
62 }
63
64 @Column(name = "NOME_FON", length = 100)
65 public String getNomeFon() {
66 return this.nomeFon;
67 }
68
69 public void setNomeFon(String nomeFon) {
70 this.nomeFon = nomeFon;
71 }
72
73 @Column(name = "IND_ATIVO_FON", length = 1)
74 public String getIndAtivoFon() {
75 return this.indAtivoFon;
76 }
77
78 public void setIndAtivoFon(String indAtivoFon) {
79 this.indAtivoFon = indAtivoFon;
80 }
81
82 @ManyToOne(fetch = FetchType.LAZY)
83 @JoinColumn(name = "COD_REC")
84 public RecursoRec getRecursoRec() {
85 return this.recursoRec;
86 }
87
88 public void setRecursoRec(RecursoRec recursoRec) {
89 this.recursoRec = recursoRec;
90 }
91
92 @OneToMany(fetch = FetchType.LAZY, mappedBy = "fonteFon")
93 public Set<EfItemEstPrevisaoEfiep> getEfItemEstPrevisaoEfieps() {
94 return this.efItemEstPrevisaoEfieps;
95 }
96
97 public void setEfItemEstPrevisaoEfieps(Set<EfItemEstPrevisaoEfiep> efItemEstPrevisaoEfieps) {
98 this.efItemEstPrevisaoEfieps = efItemEstPrevisaoEfieps;
99 }
100
101 }