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.JoinColumn;
14 import javax.persistence.ManyToOne;
15 import javax.persistence.OneToMany;
16 import javax.persistence.Table;
17 import org.hibernate.annotations.GenericGenerator;
18
19
20
21
22 @Entity
23 @Table(name = "TB_IMPORTACAO_IMP")
24 public class ImportacaoImp implements java.io.Serializable {
25
26 private static final long serialVersionUID = 1329409284782976137L;
27
28 private Long codImp;
29 private Date dataHoraImp;
30 private Date dataHoraGeracaoSisOrigem;
31 private UsuarioUsu usuarioUsu;
32 private String nomeArquivoImp;
33 private Integer numRegistrosValidosImp;
34 private Integer numRegistrosInvalidosImp;
35 private Set<HistoricoEfierH> historicoEfierHs = new HashSet<HistoricoEfierH>(0);
36
37 public ImportacaoImp() {
38 }
39
40 public ImportacaoImp(Date dataHoraImp, Date dataHoraGeracaoSisOrigem, String nomeArquivoImp, Integer numRegistrosValidosImp, Integer numRegistrosInvalidosImp) {
41 this.dataHoraImp = dataHoraImp;
42 this.dataHoraGeracaoSisOrigem = dataHoraGeracaoSisOrigem;
43 this.nomeArquivoImp = nomeArquivoImp;
44 this.numRegistrosValidosImp = numRegistrosValidosImp;
45 this.numRegistrosInvalidosImp = numRegistrosInvalidosImp;
46 }
47
48 public ImportacaoImp(Date dataHoraImp, Date dataHoraGeracaoSisOrigem, UsuarioUsu usuarioUsu, String nomeArquivoImp, Integer numRegistrosValidosImp, Integer numRegistrosInvalidosImp, Set<HistoricoEfierH> historicoEfierHs) {
49 this.dataHoraImp = dataHoraImp;
50 this.dataHoraGeracaoSisOrigem = dataHoraGeracaoSisOrigem;
51 this.usuarioUsu = usuarioUsu;
52 this.nomeArquivoImp = nomeArquivoImp;
53 this.numRegistrosValidosImp = numRegistrosValidosImp;
54 this.numRegistrosInvalidosImp = numRegistrosInvalidosImp;
55 this.historicoEfierHs = historicoEfierHs;
56 }
57
58 @GenericGenerator(name = "generator", strategy = "increment")
59 @Id
60 @GeneratedValue(generator = "generator")
61 @Column(name = "COD_IMP", nullable = false)
62 public Long getCodImp() {
63 return this.codImp;
64 }
65
66 public void setCodImp(Long codImp) {
67 this.codImp = codImp;
68 }
69
70 @Column(name = "DATA_HORA_IMP", nullable = false)
71 public Date getDataHoraImp() {
72 return this.dataHoraImp;
73 }
74
75 public void setDataHoraImp(Date dataHoraImp) {
76 this.dataHoraImp = dataHoraImp;
77 }
78
79 @Column(name = "DATA_HORA_GERACAO_SIS_ORIGEM", nullable = false)
80 public Date getDataHoraGeracaoSisOrigem() {
81 return this.dataHoraGeracaoSisOrigem;
82 }
83
84 public void setDataHoraGeracaoSisOrigem(Date dataHoraGeracaoSisOrigem) {
85 this.dataHoraGeracaoSisOrigem = dataHoraGeracaoSisOrigem;
86 }
87
88 @ManyToOne(fetch = FetchType.LAZY)
89 @JoinColumn(name = "COD_USU_IMP")
90 public UsuarioUsu getUsuarioUsu() {
91 return this.usuarioUsu;
92 }
93
94 public void setUsuarioUsu(UsuarioUsu usuarioUsu) {
95 this.usuarioUsu = usuarioUsu;
96 }
97
98 @Column(name = "NOME_ARQUIVO_IMP", nullable = false, length = 200)
99 public String getNomeArquivoImp() {
100 return this.nomeArquivoImp;
101 }
102
103 public void setNomeArquivoImp(String nomeArquivoImp) {
104 this.nomeArquivoImp = nomeArquivoImp;
105 }
106
107 @Column(name = "NUM_REGISTROS_VALIDOS_IMP", nullable = false, length = 6)
108 public Integer getNumRegistrosValidosImp() {
109 return this.numRegistrosValidosImp;
110 }
111
112 public void setNumRegistrosValidosImp(Integer numRegistrosValidosImp) {
113 this.numRegistrosValidosImp = numRegistrosValidosImp;
114 }
115
116 @Column(name = "NUM_REGISTROS_INVALIDOS_IMP", nullable = false, length = 6)
117 public Integer getNumRegistrosInvalidosImp() {
118 return this.numRegistrosInvalidosImp;
119 }
120
121 public void setNumRegistrosInvalidosImp(Integer numRegistrosInvalidosImp) {
122 this.numRegistrosInvalidosImp = numRegistrosInvalidosImp;
123 }
124
125 @OneToMany(fetch = FetchType.LAZY, mappedBy = "importacaoImp")
126 public Set<HistoricoEfierH> getHistoricoEfierHs() {
127 return this.historicoEfierHs;
128 }
129
130 public void setHistoricoEfierHs(Set<HistoricoEfierH> historicoEfierHs) {
131 this.historicoEfierHs = historicoEfierHs;
132 }
133
134 }