1 package ecar.pojo;
2
3
4
5 import java.util.HashSet;
6 import java.util.Set;
7 import javax.persistence.Column;
8 import javax.persistence.Entity;
9 import javax.persistence.FetchType;
10 import javax.persistence.GeneratedValue;
11 import javax.persistence.Id;
12 import javax.persistence.OneToMany;
13 import javax.persistence.Table;
14 import org.hibernate.annotations.GenericGenerator;
15
16
17
18
19 @Entity
20 @Table(name = "tb_modelo_relatorio_mrel")
21 public class ModeloRelatorioMrel implements java.io.Serializable {
22
23 private Integer codMrel;
24 private String descricaoMrel;
25 private String classifMrel;
26 private String codAlfaMrel;
27 private Set<ConfigRelatorioCfgrel> configRelatorioCfgrels = new HashSet<ConfigRelatorioCfgrel>(0);
28
29 public ModeloRelatorioMrel() {
30 }
31
32 public ModeloRelatorioMrel(String descricaoMrel, String classifMrel, String codAlfaMrel, Set<ConfigRelatorioCfgrel> configRelatorioCfgrels) {
33 this.descricaoMrel = descricaoMrel;
34 this.classifMrel = classifMrel;
35 this.codAlfaMrel = codAlfaMrel;
36 this.configRelatorioCfgrels = configRelatorioCfgrels;
37 }
38
39 @GenericGenerator(name = "generator", strategy = "increment")
40 @Id
41 @GeneratedValue(generator = "generator")
42 @Column(name = "cod_mrel", nullable = false, length = 4)
43 public Integer getCodMrel() {
44 return this.codMrel;
45 }
46
47 public void setCodMrel(Integer codMrel) {
48 this.codMrel = codMrel;
49 }
50
51 @Column(name = "descricao_mrel", length = 200)
52 public String getDescricaoMrel() {
53 return this.descricaoMrel;
54 }
55
56 public void setDescricaoMrel(String descricaoMrel) {
57 this.descricaoMrel = descricaoMrel;
58 }
59
60 @Column(name = "classif_mrel", length = 20)
61 public String getClassifMrel() {
62 return this.classifMrel;
63 }
64
65 public void setClassifMrel(String classifMrel) {
66 this.classifMrel = classifMrel;
67 }
68
69 @Column(name = "cod_alfa_mrel", length = 20)
70 public String getCodAlfaMrel() {
71 return this.codAlfaMrel;
72 }
73
74 public void setCodAlfaMrel(String codAlfaMrel) {
75 this.codAlfaMrel = codAlfaMrel;
76 }
77
78 @OneToMany(fetch = FetchType.LAZY, mappedBy = "modeloRelatorioMrel")
79 public Set<ConfigRelatorioCfgrel> getConfigRelatorioCfgrels() {
80 return this.configRelatorioCfgrels;
81 }
82
83 public void setConfigRelatorioCfgrels(Set<ConfigRelatorioCfgrel> configRelatorioCfgrels) {
84 this.configRelatorioCfgrels = configRelatorioCfgrels;
85 }
86
87 }