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 javax.persistence.Temporal;
18 import javax.persistence.TemporalType;
19 import org.hibernate.annotations.GenericGenerator;
20
21
22
23
24 @Entity
25 @Table(name = "TB_ITEM_ESTRUT_ACAO_IETTA")
26 public class ItemEstrutAcaoIetta implements java.io.Serializable {
27
28 private Long codIetta;
29 private String indAtivoIetta;
30 private Date dataInclusaoIetta;
31 private Date dataIetta;
32 private String descricaoIetta;
33 private Boolean indExclusaoPosHistorico;
34 private ItemEstruturaIett itemEstruturaIett;
35 private UsuarioUsu usuarioUsu;
36 private UsuarioUsu usuarioUsuManutencao;
37 private Set<HistoricoIettaH> historicoIettaHs = new HashSet<HistoricoIettaH>(0);
38
39 public ItemEstrutAcaoIetta() {
40 }
41
42 public ItemEstrutAcaoIetta(String indAtivoIetta, Date dataInclusaoIetta, Date dataIetta, String descricaoIetta, Boolean indExclusaoPosHistorico, ItemEstruturaIett itemEstruturaIett, UsuarioUsu usuarioUsu, UsuarioUsu usuarioUsuManutencao, Set<HistoricoIettaH> historicoIettaHs) {
43 this.indAtivoIetta = indAtivoIetta;
44 this.dataInclusaoIetta = dataInclusaoIetta;
45 this.dataIetta = dataIetta;
46 this.descricaoIetta = descricaoIetta;
47 this.indExclusaoPosHistorico = indExclusaoPosHistorico;
48 this.itemEstruturaIett = itemEstruturaIett;
49 this.usuarioUsu = usuarioUsu;
50 this.usuarioUsuManutencao = usuarioUsuManutencao;
51 this.historicoIettaHs = historicoIettaHs;
52 }
53
54 @GenericGenerator(name = "generator", strategy = "increment")
55 @Id
56 @GeneratedValue(generator = "generator")
57 @Column(name = "COD_IETTA", nullable = false)
58 public Long getCodIetta() {
59 return this.codIetta;
60 }
61
62 public void setCodIetta(Long codIetta) {
63 this.codIetta = codIetta;
64 }
65
66 @Column(name = "IND_ATIVO_IETTA", length = 1)
67 public String getIndAtivoIetta() {
68 return this.indAtivoIetta;
69 }
70
71 public void setIndAtivoIetta(String indAtivoIetta) {
72 this.indAtivoIetta = indAtivoIetta;
73 }
74
75 @Temporal(TemporalType.TIMESTAMP)
76 @Column(name = "DATA_INCLUSAO_IETTA", length = 7)
77 public Date getDataInclusaoIetta() {
78 return this.dataInclusaoIetta;
79 }
80
81 public void setDataInclusaoIetta(Date dataInclusaoIetta) {
82 this.dataInclusaoIetta = dataInclusaoIetta;
83 }
84
85 @Temporal(TemporalType.TIMESTAMP)
86 @Column(name = "DATA_IETTA", length = 7)
87 public Date getDataIetta() {
88 return this.dataIetta;
89 }
90
91 public void setDataIetta(Date dataIetta) {
92 this.dataIetta = dataIetta;
93 }
94
95 @Column(name = "DESCRICAO_IETTA", length = 2000)
96 public String getDescricaoIetta() {
97 return this.descricaoIetta;
98 }
99
100 public void setDescricaoIetta(String descricaoIetta) {
101 this.descricaoIetta = descricaoIetta;
102 }
103
104 @Column(name = "IND_EXCLUSAO_POS_HISTORICO")
105 public Boolean getIndExclusaoPosHistorico() {
106 return this.indExclusaoPosHistorico;
107 }
108
109 public void setIndExclusaoPosHistorico(Boolean indExclusaoPosHistorico) {
110 this.indExclusaoPosHistorico = indExclusaoPosHistorico;
111 }
112
113 @ManyToOne(fetch = FetchType.LAZY)
114 @JoinColumn(name = "COD_IETT")
115 public ItemEstruturaIett getItemEstruturaIett() {
116 return this.itemEstruturaIett;
117 }
118
119 public void setItemEstruturaIett(ItemEstruturaIett itemEstruturaIett) {
120 this.itemEstruturaIett = itemEstruturaIett;
121 }
122
123 @ManyToOne(fetch = FetchType.LAZY)
124 @JoinColumn(name = "COD_USU")
125 public UsuarioUsu getUsuarioUsu() {
126 return this.usuarioUsu;
127 }
128
129 public void setUsuarioUsu(UsuarioUsu usuarioUsu) {
130 this.usuarioUsu = usuarioUsu;
131 }
132
133 @ManyToOne(fetch = FetchType.LAZY)
134 @JoinColumn(name = "COD_USU_MANUTENCAO")
135 public UsuarioUsu getUsuarioUsuManutencao() {
136 return this.usuarioUsuManutencao;
137 }
138
139 public void setUsuarioUsuManutencao(UsuarioUsu usuarioUsuManutencao) {
140 this.usuarioUsuManutencao = usuarioUsuManutencao;
141 }
142
143 @OneToMany(fetch = FetchType.LAZY, mappedBy = "itemEstrutAcaoIetta")
144 public Set<HistoricoIettaH> getHistoricoIettaHs() {
145 return this.historicoIettaHs;
146 }
147
148 public void setHistoricoIettaHs(Set<HistoricoIettaH> historicoIettaHs) {
149 this.historicoIettaHs = historicoIettaHs;
150 }
151
152 }