1 package ecar.pojo;
2
3
4
5 import java.util.Date;
6 import javax.persistence.AttributeOverride;
7 import javax.persistence.AttributeOverrides;
8 import javax.persistence.Column;
9 import javax.persistence.EmbeddedId;
10 import javax.persistence.Entity;
11 import javax.persistence.FetchType;
12 import javax.persistence.JoinColumn;
13 import javax.persistence.ManyToOne;
14 import javax.persistence.Table;
15 import javax.persistence.Temporal;
16 import javax.persistence.TemporalType;
17
18
19
20
21 @Entity
22 @Table(name = "tb_ef_iett_previsao_rev_efiepr")
23 public class EfIettPrevisaoRevEfiepr implements java.io.Serializable, PaiFilho {
24
25 private static final long serialVersionUID = 2832761958274489410L;
26
27 private EfIettPrevisaoRevEfieprPK comp_id;
28 private Date dataInclusaoEfiepr;
29 private String indAtivoEfiepr;
30 private Double valorRevisadoEfiepr;
31 private Double valorAprovadoEfiepr;
32 private RecursoRec recursoRec;
33 private FonteRecursoFonr fonteRecursoFonr;
34 private ExercicioExe exercicioExe;
35 private ItemEstruturarevisaoIettrev itemEstruturarevisaoIettrev;
36
37 public EfIettPrevisaoRevEfiepr() {
38 }
39
40 public EfIettPrevisaoRevEfiepr(EfIettPrevisaoRevEfieprPK comp_id) {
41 this.comp_id = comp_id;
42 }
43
44 public EfIettPrevisaoRevEfiepr(EfIettPrevisaoRevEfieprPK comp_id, Date dataInclusaoEfiepr, String indAtivoEfiepr, Double valorRevisadoEfiepr, Double valorAprovadoEfiepr, RecursoRec recursoRec, FonteRecursoFonr fonteRecursoFonr, ExercicioExe exercicioExe, ItemEstruturarevisaoIettrev itemEstruturarevisaoIettrev) {
45 this.comp_id = comp_id;
46 this.dataInclusaoEfiepr = dataInclusaoEfiepr;
47 this.indAtivoEfiepr = indAtivoEfiepr;
48 this.valorRevisadoEfiepr = valorRevisadoEfiepr;
49 this.valorAprovadoEfiepr = valorAprovadoEfiepr;
50 this.recursoRec = recursoRec;
51 this.fonteRecursoFonr = fonteRecursoFonr;
52 this.exercicioExe = exercicioExe;
53 this.itemEstruturarevisaoIettrev = itemEstruturarevisaoIettrev;
54 }
55
56 @EmbeddedId
57 @AttributeOverrides( { @AttributeOverride(name = "codIettrev", column = @Column(name = "cod_iettrev", nullable = false, length = 4)), @AttributeOverride(name = "codRec", column = @Column(name = "cod_rec", nullable = false, length = 4)), @AttributeOverride(name = "codFonr", column = @Column(name = "cod_fonr", nullable = false, length = 4)), @AttributeOverride(name = "codExe", column = @Column(name = "cod_exe", nullable = false, length = 4)) })
58 public EfIettPrevisaoRevEfieprPK getComp_id() {
59 return this.comp_id;
60 }
61
62 public void setComp_id(EfIettPrevisaoRevEfieprPK comp_id) {
63 this.comp_id = comp_id;
64 }
65
66 @Temporal(TemporalType.TIMESTAMP)
67 @Column(name = "data_inclusao_efiepr", length = 4)
68 public Date getDataInclusaoEfiepr() {
69 return this.dataInclusaoEfiepr;
70 }
71
72 public void setDataInclusaoEfiepr(Date dataInclusaoEfiepr) {
73 this.dataInclusaoEfiepr = dataInclusaoEfiepr;
74 }
75
76 @Column(name = "ind_ativo_efiepr", length = 1)
77 public String getIndAtivoEfiepr() {
78 return this.indAtivoEfiepr;
79 }
80
81 public void setIndAtivoEfiepr(String indAtivoEfiepr) {
82 this.indAtivoEfiepr = indAtivoEfiepr;
83 }
84
85 @Column(name = "valor_revisado_efiepr", length = 8)
86 public Double getValorRevisadoEfiepr() {
87 return this.valorRevisadoEfiepr;
88 }
89
90 public void setValorRevisadoEfiepr(Double valorRevisadoEfiepr) {
91 this.valorRevisadoEfiepr = valorRevisadoEfiepr;
92 }
93
94 @Column(name = "valor_aprovado_efiepr", length = 8)
95 public Double getValorAprovadoEfiepr() {
96 return this.valorAprovadoEfiepr;
97 }
98
99 public void setValorAprovadoEfiepr(Double valorAprovadoEfiepr) {
100 this.valorAprovadoEfiepr = valorAprovadoEfiepr;
101 }
102
103 @ManyToOne(fetch = FetchType.LAZY)
104 @JoinColumn(name = "cod_rec", insertable = false, updatable = false)
105 public RecursoRec getRecursoRec() {
106 return this.recursoRec;
107 }
108
109 public void setRecursoRec(RecursoRec recursoRec) {
110 this.recursoRec = recursoRec;
111 }
112
113 @ManyToOne(fetch = FetchType.LAZY)
114 @JoinColumn(name = "cod_fonr", insertable = false, updatable = false)
115 public FonteRecursoFonr getFonteRecursoFonr() {
116 return this.fonteRecursoFonr;
117 }
118
119 public void setFonteRecursoFonr(FonteRecursoFonr fonteRecursoFonr) {
120 this.fonteRecursoFonr = fonteRecursoFonr;
121 }
122
123 @ManyToOne(fetch = FetchType.LAZY)
124 @JoinColumn(name = "cod_exe", insertable = false, updatable = false)
125 public ExercicioExe getExercicioExe() {
126 return this.exercicioExe;
127 }
128
129 public void setExercicioExe(ExercicioExe exercicioExe) {
130 this.exercicioExe = exercicioExe;
131 }
132
133 @ManyToOne(fetch = FetchType.LAZY)
134 @JoinColumn(name = "cod_iettrev", insertable = false, updatable = false)
135 public ItemEstruturarevisaoIettrev getItemEstruturarevisaoIettrev() {
136 return this.itemEstruturarevisaoIettrev;
137 }
138
139 public void setItemEstruturarevisaoIettrev(ItemEstruturarevisaoIettrev itemEstruturarevisaoIettrev) {
140 this.itemEstruturarevisaoIettrev = itemEstruturarevisaoIettrev;
141 }
142
143
144 public void atribuirPKPai() {
145 comp_id = new EfIettPrevisaoRevEfieprPK();
146 comp_id.setCodExe(this.getExercicioExe().getCodExe());
147 comp_id.setCodFonr(this.getFonteRecursoFonr().getCodFonr());
148 comp_id.setCodIettrev(this.getItemEstruturarevisaoIettrev().getCodIettrev());
149 comp_id.setCodRec(this.getRecursoRec().getCodRec());
150
151 }
152
153 }