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.JoinColumn;
13 import javax.persistence.JoinTable;
14 import javax.persistence.ManyToMany;
15 import javax.persistence.ManyToOne;
16 import javax.persistence.OneToMany;
17 import javax.persistence.Table;
18 import org.hibernate.annotations.Cascade;
19 import org.hibernate.annotations.CascadeType;
20 import org.hibernate.annotations.GenericGenerator;
21
22
23
24
25 @Entity
26 @Table(name = "tb_abas")
27 public class Aba implements java.io.Serializable {
28
29 private static final long serialVersionUID = 6831326732056396337L;
30
31 private Long codAba;
32 private String labelAba;
33 private String exibePosicaoAba;
34 private Integer ordemAba;
35 private String nomeAba;
36 private String indGeral;
37 private String abaSuperior;
38 private Set<ConfiguracaoCfg> configuracaoCfgs = new HashSet<ConfiguracaoCfg>(0);
39 private Set<TipoAcompAbasSisatributoTaAbaSatb> tipoacompAbasSisatributoTaabasatbs = new HashSet<TipoAcompAbasSisatributoTaAbaSatb>(0);
40 private FuncaoFun funcaoFun;
41
42 public Aba() {
43 }
44
45 public Aba(String labelAba, String exibePosicaoAba, Integer ordemAba, String nomeAba, String indGeral, String abaSuperior, Set<ConfiguracaoCfg> configuracaoCfgs, Set<TipoAcompAbasSisatributoTaAbaSatb> tipoacompAbasSisatributoTaabasatbs, FuncaoFun funcaoFun) {
46 this.labelAba = labelAba;
47 this.exibePosicaoAba = exibePosicaoAba;
48 this.ordemAba = ordemAba;
49 this.nomeAba = nomeAba;
50 this.indGeral = indGeral;
51 this.abaSuperior = abaSuperior;
52 this.configuracaoCfgs = configuracaoCfgs;
53 this.tipoacompAbasSisatributoTaabasatbs = tipoacompAbasSisatributoTaabasatbs;
54 this.funcaoFun = funcaoFun;
55 }
56
57 @GenericGenerator(name = "generator", strategy = "increment")
58 @Id
59 @GeneratedValue(generator = "generator")
60 @Column(name = "cod_aba", nullable = false)
61 public Long getCodAba() {
62 return this.codAba;
63 }
64
65 public void setCodAba(Long codAba) {
66 this.codAba = codAba;
67 }
68
69 @Column(name = "label_aba", length = 2000)
70 public String getLabelAba() {
71 return this.labelAba;
72 }
73
74 public void setLabelAba(String labelAba) {
75 this.labelAba = labelAba;
76 }
77
78 @Column(name = "exibe_posicao_aba", length = 1)
79 public String getExibePosicaoAba() {
80 return this.exibePosicaoAba;
81 }
82
83 public void setExibePosicaoAba(String exibePosicaoAba) {
84 this.exibePosicaoAba = exibePosicaoAba;
85 }
86
87 @Column(name = "ordem_aba")
88 public Integer getOrdemAba() {
89 return this.ordemAba;
90 }
91
92 public void setOrdemAba(Integer ordemAba) {
93 this.ordemAba = ordemAba;
94 }
95
96 @Column(name = "nome_aba", length = 40)
97 public String getNomeAba() {
98 return this.nomeAba;
99 }
100
101 public void setNomeAba(String nomeAba) {
102 this.nomeAba = nomeAba;
103 }
104
105 @Column(name = "ind_geral", length = 1)
106 public String getIndGeral() {
107 return this.indGeral;
108 }
109
110 public void setIndGeral(String indGeral) {
111 this.indGeral = indGeral;
112 }
113
114 @Column(name = "aba_superior", length = 1)
115 public String getAbaSuperior() {
116 return this.abaSuperior;
117 }
118
119 public void setAbaSuperior(String abaSuperior) {
120 this.abaSuperior = abaSuperior;
121 }
122
123 @ManyToMany(fetch = FetchType.LAZY)
124 @JoinTable(name = "TB_CONFIG_ABAS_CFGA", joinColumns = { @JoinColumn(name = "cod_aba", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "COD_CFG", nullable = false, updatable = false) })
125 @Cascade( { CascadeType.SAVE_UPDATE })
126 public Set<ConfiguracaoCfg> getConfiguracaoCfgs() {
127 return this.configuracaoCfgs;
128 }
129
130 public void setConfiguracaoCfgs(Set<ConfiguracaoCfg> configuracaoCfgs) {
131 this.configuracaoCfgs = configuracaoCfgs;
132 }
133
134 @OneToMany(fetch = FetchType.LAZY, mappedBy = "abas")
135 public Set<TipoAcompAbasSisatributoTaAbaSatb> getTipoacompAbasSisatributoTaabasatbs() {
136 return this.tipoacompAbasSisatributoTaabasatbs;
137 }
138
139 public void setTipoacompAbasSisatributoTaabasatbs(Set<TipoAcompAbasSisatributoTaAbaSatb> tipoacompAbasSisatributoTaabasatbs) {
140 this.tipoacompAbasSisatributoTaabasatbs = tipoacompAbasSisatributoTaabasatbs;
141 }
142
143 @ManyToOne(fetch = FetchType.LAZY)
144 @JoinColumn(name = "cod_fun")
145 public FuncaoFun getFuncaoFun() {
146 return this.funcaoFun;
147 }
148
149 public void setFuncaoFun(FuncaoFun funcaoFun) {
150 this.funcaoFun = funcaoFun;
151 }
152
153 }