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.Id;
12 import javax.persistence.OneToMany;
13 import javax.persistence.Table;
14 import javax.persistence.Temporal;
15 import javax.persistence.TemporalType;
16
17
18
19
20 @Entity
21 @Table(name = "TB_ESPECIE_ESP")
22 public class EspecieEsp implements java.io.Serializable {
23
24 private Long codEsp;
25 private String indAtivoEsp;
26 private Date dataInclusaoEsp;
27 private String descricaoEsp;
28 private Set<EfItemEstPrevisaoEfiep> efItemEstPrevisaoEfieps = new HashSet<EfItemEstPrevisaoEfiep>(0);
29
30 public EspecieEsp() {
31 }
32
33 public EspecieEsp(Long codEsp) {
34 this.codEsp = codEsp;
35 }
36
37 public EspecieEsp(Long codEsp, String indAtivoEsp, Date dataInclusaoEsp, String descricaoEsp, Set<EfItemEstPrevisaoEfiep> efItemEstPrevisaoEfieps) {
38 this.codEsp = codEsp;
39 this.indAtivoEsp = indAtivoEsp;
40 this.dataInclusaoEsp = dataInclusaoEsp;
41 this.descricaoEsp = descricaoEsp;
42 this.efItemEstPrevisaoEfieps = efItemEstPrevisaoEfieps;
43 }
44
45 @Id
46 @Column(name = "COD_ESP", nullable = false)
47 public Long getCodEsp() {
48 return this.codEsp;
49 }
50
51 public void setCodEsp(Long codEsp) {
52 this.codEsp = codEsp;
53 }
54
55 @Column(name = "IND_ATIVO_ESP", length = 1)
56 public String getIndAtivoEsp() {
57 return this.indAtivoEsp;
58 }
59
60 public void setIndAtivoEsp(String indAtivoEsp) {
61 this.indAtivoEsp = indAtivoEsp;
62 }
63
64 @Temporal(TemporalType.TIMESTAMP)
65 @Column(name = "DATA_INCLUSAO_ESP", length = 7)
66 public Date getDataInclusaoEsp() {
67 return this.dataInclusaoEsp;
68 }
69
70 public void setDataInclusaoEsp(Date dataInclusaoEsp) {
71 this.dataInclusaoEsp = dataInclusaoEsp;
72 }
73
74 @Column(name = "DESCRICAO_ESP", length = 100)
75 public String getDescricaoEsp() {
76 return this.descricaoEsp;
77 }
78
79 public void setDescricaoEsp(String descricaoEsp) {
80 this.descricaoEsp = descricaoEsp;
81 }
82
83 @OneToMany(fetch = FetchType.LAZY, mappedBy = "especieEsp")
84 public Set<EfItemEstPrevisaoEfiep> getEfItemEstPrevisaoEfieps() {
85 return this.efItemEstPrevisaoEfieps;
86 }
87
88 public void setEfItemEstPrevisaoEfieps(Set<EfItemEstPrevisaoEfiep> efItemEstPrevisaoEfieps) {
89 this.efItemEstPrevisaoEfieps = efItemEstPrevisaoEfieps;
90 }
91
92 }