1 package ecar.pojo;
2
3
4
5 import java.util.Date;
6 import java.util.HashSet;
7 import java.util.Set;
8
9 import javax.persistence.Column;
10 import javax.persistence.Entity;
11 import javax.persistence.FetchType;
12 import javax.persistence.GeneratedValue;
13 import javax.persistence.Id;
14 import javax.persistence.JoinColumn;
15 import javax.persistence.JoinTable;
16 import javax.persistence.ManyToMany;
17 import javax.persistence.ManyToOne;
18 import javax.persistence.OneToMany;
19 import javax.persistence.Table;
20 import javax.persistence.Temporal;
21 import javax.persistence.TemporalType;
22
23 import org.hibernate.annotations.Cascade;
24 import org.hibernate.annotations.CascadeType;
25 import org.hibernate.annotations.GenericGenerator;
26
27
28
29
30 @Entity
31 @Table(name = "TB_REG_DEMANDA_REGD")
32 public class RegDemandaRegd implements java.io.Serializable {
33
34 private static final long serialVersionUID = -893662317272971674L;
35
36 private Long codRegd;
37 private Date dataLimiteRegd;
38 private String descricaoRegd;
39 private String observacaoRegd;
40 private Integer numeroDocOrigemRegd;
41 private Date dataSolicitacaoRegd;
42 private Date dataInclusaoRegd;
43 private String indAtivoRegd;
44 private String nomeSolicitanteRegd;
45 private Date dataSituacaoRegd;
46 private PrioridadePrior prioridadePrior;
47 private Set<LocalItemLit> localDemandaLdems = new HashSet<LocalItemLit>(0);
48 private Set<RegApontamentoRegda> regApontamentoRegdas = new HashSet<RegApontamentoRegda>(0);
49 private Set<ItemEstruturaIett> itemRegdemandaIregds = new HashSet<ItemEstruturaIett>(0);
50 private Set<DemAtributoDema> demAtributoDemas = new HashSet<DemAtributoDema>(0);
51 private SitDemandaSitd sitDemandaSitd;
52 private UsuarioUsu usuarioUsuByCodUsuInclusaoRegd;
53 private Set<EntidadeEnt> entidadeOrgaoDemandaEntorgds = new HashSet<EntidadeEnt>(0);
54 private Set<RegDemandaRegd> regDemandaRegds = new HashSet<RegDemandaRegd>(0);
55 private RegDemandaRegd regDemandaRegd;
56 private Set<EntidadeEnt> entidadeDemandaEntds = new HashSet<EntidadeEnt>(0);
57
58 public RegDemandaRegd() {
59 }
60
61 public RegDemandaRegd(Date dataLimiteRegd, String descricaoRegd, String observacaoRegd, Integer numeroDocOrigemRegd, Date dataSolicitacaoRegd, Date dataInclusaoRegd, String indAtivoRegd, String nomeSolicitanteRegd, Date dataSituacaoRegd, PrioridadePrior prioridadePrior, Set<LocalItemLit> localDemandaLdems, Set<RegApontamentoRegda> regApontamentoRegdas, Set<ItemEstruturaIett> itemRegdemandaIregds, Set<DemAtributoDema> demAtributoDemas, SitDemandaSitd sitDemandaSitd, UsuarioUsu usuarioUsuByCodUsuInclusaoRegd, Set<EntidadeEnt> entidadeOrgaoDemandaEntorgds, Set<RegDemandaRegd> regDemandaRegds, RegDemandaRegd regDemandaRegd, Set<EntidadeEnt> entidadeDemandaEntds) {
62 this.dataLimiteRegd = dataLimiteRegd;
63 this.descricaoRegd = descricaoRegd;
64 this.observacaoRegd = observacaoRegd;
65 this.numeroDocOrigemRegd = numeroDocOrigemRegd;
66 this.dataSolicitacaoRegd = dataSolicitacaoRegd;
67 this.dataInclusaoRegd = dataInclusaoRegd;
68 this.indAtivoRegd = indAtivoRegd;
69 this.nomeSolicitanteRegd = nomeSolicitanteRegd;
70 this.dataSituacaoRegd = dataSituacaoRegd;
71 this.prioridadePrior = prioridadePrior;
72 this.localDemandaLdems = localDemandaLdems;
73 this.regApontamentoRegdas = regApontamentoRegdas;
74 this.itemRegdemandaIregds = itemRegdemandaIregds;
75 this.demAtributoDemas = demAtributoDemas;
76 this.sitDemandaSitd = sitDemandaSitd;
77 this.usuarioUsuByCodUsuInclusaoRegd = usuarioUsuByCodUsuInclusaoRegd;
78 this.entidadeOrgaoDemandaEntorgds = entidadeOrgaoDemandaEntorgds;
79 this.regDemandaRegds = regDemandaRegds;
80 this.regDemandaRegd = regDemandaRegd;
81 this.entidadeDemandaEntds = entidadeDemandaEntds;
82 }
83
84 @GenericGenerator(name = "generator", strategy = "increment")
85 @Id
86 @GeneratedValue(generator = "generator")
87 @Column(name = "COD_REGD", nullable = false)
88 public Long getCodRegd() {
89 return this.codRegd;
90 }
91
92 public void setCodRegd(Long codRegd) {
93 this.codRegd = codRegd;
94 }
95
96 @Temporal(TemporalType.TIMESTAMP)
97 @Column(name = "DATA_LIMITE_REGD", length = 7)
98 public Date getDataLimiteRegd() {
99 return this.dataLimiteRegd;
100 }
101
102 public void setDataLimiteRegd(Date dataLimiteRegd) {
103 this.dataLimiteRegd = dataLimiteRegd;
104 }
105
106 @Column(name = "DESCRICAO_REGD", length = 2000)
107 public String getDescricaoRegd() {
108 return this.descricaoRegd;
109 }
110
111 public void setDescricaoRegd(String descricaoRegd) {
112 this.descricaoRegd = descricaoRegd;
113 }
114
115 @Column(name = "OBSERVACAO_REGD", length = 20)
116 public String getObservacaoRegd() {
117 return this.observacaoRegd;
118 }
119
120 public void setObservacaoRegd(String observacaoRegd) {
121 this.observacaoRegd = observacaoRegd;
122 }
123
124 @Column(name = "NUMERO_DOC_ORIGEM_REGD", length = 22)
125 public Integer getNumeroDocOrigemRegd() {
126 return this.numeroDocOrigemRegd;
127 }
128
129 public void setNumeroDocOrigemRegd(Integer numeroDocOrigemRegd) {
130 this.numeroDocOrigemRegd = numeroDocOrigemRegd;
131 }
132
133 @Temporal(TemporalType.TIMESTAMP)
134 @Column(name = "DATA_SOLICITACAO_REGD", length = 7)
135 public Date getDataSolicitacaoRegd() {
136 return this.dataSolicitacaoRegd;
137 }
138
139 public void setDataSolicitacaoRegd(Date dataSolicitacaoRegd) {
140 this.dataSolicitacaoRegd = dataSolicitacaoRegd;
141 }
142
143 @Temporal(TemporalType.TIMESTAMP)
144 @Column(name = "DATA_INCLUSAO_REGD", length = 7)
145 public Date getDataInclusaoRegd() {
146 return this.dataInclusaoRegd;
147 }
148
149 public void setDataInclusaoRegd(Date dataInclusaoRegd) {
150 this.dataInclusaoRegd = dataInclusaoRegd;
151 }
152
153 @Column(name = "IND_ATIVO_REGD", length = 1)
154 public String getIndAtivoRegd() {
155 return this.indAtivoRegd;
156 }
157
158 public void setIndAtivoRegd(String indAtivoRegd) {
159 this.indAtivoRegd = indAtivoRegd;
160 }
161
162 @Column(name = "NOME_SOLICITANTE_REGD", length = 50)
163 public String getNomeSolicitanteRegd() {
164 return this.nomeSolicitanteRegd;
165 }
166
167 public void setNomeSolicitanteRegd(String nomeSolicitanteRegd) {
168 this.nomeSolicitanteRegd = nomeSolicitanteRegd;
169 }
170
171 @Temporal(TemporalType.TIMESTAMP)
172 @Column(name = "data_situacao_regd")
173 public Date getDataSituacaoRegd() {
174 return this.dataSituacaoRegd;
175 }
176
177 public void setDataSituacaoRegd(Date dataSituacaoRegd) {
178 this.dataSituacaoRegd = dataSituacaoRegd;
179 }
180
181 @ManyToOne(fetch = FetchType.LAZY)
182 @JoinColumn(name = "COD_PRIOR")
183 public PrioridadePrior getPrioridadePrior() {
184 return this.prioridadePrior;
185 }
186
187 public void setPrioridadePrior(PrioridadePrior prioridadePrior) {
188 this.prioridadePrior = prioridadePrior;
189 }
190
191 @ManyToMany(fetch = FetchType.LAZY)
192 @JoinTable(name = "TB_LOCAL_DEMANDA_LDEM", joinColumns = { @JoinColumn(name = "COD_REGD", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "COD_LIT", nullable = false, updatable = false) })
193 @Cascade( { CascadeType.SAVE_UPDATE })
194 public Set<LocalItemLit> getLocalDemandaLdems() {
195 return this.localDemandaLdems;
196 }
197
198 public void setLocalDemandaLdems(Set<LocalItemLit> localDemandaLdems) {
199 this.localDemandaLdems = localDemandaLdems;
200 }
201
202 @OneToMany(fetch = FetchType.LAZY, mappedBy = "regDemandaRegd")
203 @Cascade( { CascadeType.SAVE_UPDATE })
204 public Set<RegApontamentoRegda> getRegApontamentoRegdas() {
205 return this.regApontamentoRegdas;
206 }
207
208 public void setRegApontamentoRegdas(Set<RegApontamentoRegda> regApontamentoRegdas) {
209 this.regApontamentoRegdas = regApontamentoRegdas;
210 }
211
212 @ManyToMany(fetch = FetchType.EAGER)
213 @JoinTable(name = "TB_ITEM_REGDEMANDA_IREGD", joinColumns = { @JoinColumn(name = "COD_REGD", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "COD_IETT", nullable = false, updatable = false) })
214 @Cascade( { CascadeType.SAVE_UPDATE })
215 public Set<ItemEstruturaIett> getItemRegdemandaIregds() {
216 return this.itemRegdemandaIregds;
217 }
218
219 public void setItemRegdemandaIregds(Set<ItemEstruturaIett> itemRegdemandaIregds) {
220 this.itemRegdemandaIregds = itemRegdemandaIregds;
221 }
222
223 @OneToMany(fetch = FetchType.LAZY, mappedBy = "regDemandaRegd")
224 public Set<DemAtributoDema> getDemAtributoDemas() {
225 return this.demAtributoDemas;
226 }
227
228 public void setDemAtributoDemas(Set<DemAtributoDema> demAtributoDemas) {
229 this.demAtributoDemas = demAtributoDemas;
230 }
231
232 @ManyToOne(fetch = FetchType.LAZY)
233 @JoinColumn(name = "COD_SITD")
234 public SitDemandaSitd getSitDemandaSitd() {
235 return this.sitDemandaSitd;
236 }
237
238 public void setSitDemandaSitd(SitDemandaSitd sitDemandaSitd) {
239 this.sitDemandaSitd = sitDemandaSitd;
240 }
241
242 @ManyToOne(fetch = FetchType.LAZY)
243 @JoinColumn(name = "COD_USU_INCLUSAO_REGD")
244 public UsuarioUsu getUsuarioUsuByCodUsuInclusaoRegd() {
245 return this.usuarioUsuByCodUsuInclusaoRegd;
246 }
247
248 public void setUsuarioUsuByCodUsuInclusaoRegd(UsuarioUsu usuarioUsuByCodUsuInclusaoRegd) {
249 this.usuarioUsuByCodUsuInclusaoRegd = usuarioUsuByCodUsuInclusaoRegd;
250 }
251
252 @ManyToMany(fetch = FetchType.LAZY)
253 @JoinTable(name = "TB_ENTIDADEORGAO_DEMANDA_ENTORGDEM", joinColumns = { @JoinColumn(name = "COD_REGD", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "COD_ENT", nullable = false, updatable = false) })
254 @Cascade( { CascadeType.SAVE_UPDATE })
255 public Set<EntidadeEnt> getEntidadeOrgaoDemandaEntorgds() {
256 return this.entidadeOrgaoDemandaEntorgds;
257 }
258
259 public void setEntidadeOrgaoDemandaEntorgds(Set<EntidadeEnt> entidadeOrgaoDemandaEntorgds) {
260 this.entidadeOrgaoDemandaEntorgds = entidadeOrgaoDemandaEntorgds;
261 }
262
263 @OneToMany(fetch = FetchType.LAZY, mappedBy = "regDemandaRegd")
264 @Cascade( { CascadeType.SAVE_UPDATE })
265 public Set<RegDemandaRegd> getRegDemandaRegds() {
266 return this.regDemandaRegds;
267 }
268
269 public void setRegDemandaRegds(Set<RegDemandaRegd> regDemandaRegds) {
270 this.regDemandaRegds = regDemandaRegds;
271 }
272
273 @ManyToOne(fetch = FetchType.LAZY)
274 @JoinColumn(name = "COD_REGD_PAI")
275 public RegDemandaRegd getRegDemandaRegd() {
276 return this.regDemandaRegd;
277 }
278
279 public void setRegDemandaRegd(RegDemandaRegd regDemandaRegd) {
280 this.regDemandaRegd = regDemandaRegd;
281 }
282
283 @ManyToMany(fetch = FetchType.LAZY)
284 @JoinTable(name = "TB_ENTIDADE_DEMANDA_ENTD", joinColumns = { @JoinColumn(name = "COD_REGD", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "COD_ENT", nullable = false, updatable = false) })
285 @Cascade( { CascadeType.SAVE_UPDATE })
286 public Set<EntidadeEnt> getEntidadeDemandaEntds() {
287 return this.entidadeDemandaEntds;
288 }
289
290 public void setEntidadeDemandaEntds(Set<EntidadeEnt> entidadeDemandaEntds) {
291 this.entidadeDemandaEntds = entidadeDemandaEntds;
292 }
293
294 }