1 package ecar.pojo;
2
3
4
5 import javax.persistence.Column;
6 import javax.persistence.EmbeddedId;
7 import javax.persistence.Entity;
8 import javax.persistence.FetchType;
9 import javax.persistence.JoinColumn;
10 import javax.persistence.ManyToOne;
11 import javax.persistence.Table;
12
13
14
15
16 @Entity
17 @Table(name = "tb_tfuncacomp_configmail_tfacfgm")
18 public class TfuncacompConfigmailTfacfgm implements java.io.Serializable, PaiFilho {
19
20 private static final long serialVersionUID = 4417116869677092954L;
21
22 private TfuncacompConfigmailTfacfgmPK comp_id;
23 private String enviaSms;
24 private String enviaMailTfacfgm;
25 private ConfigMailCfgm configMailCfgm;
26 private TipoFuncAcompTpfa tipoFuncAcompTpfa;
27
28 public TfuncacompConfigmailTfacfgm() {
29 }
30
31 public TfuncacompConfigmailTfacfgm(TfuncacompConfigmailTfacfgmPK comp_id) {
32 this.comp_id = comp_id;
33 }
34
35 public TfuncacompConfigmailTfacfgm(TfuncacompConfigmailTfacfgmPK comp_id, String enviaSms, String enviaMailTfacfgm, ConfigMailCfgm configMailCfgm, TipoFuncAcompTpfa tipoFuncAcompTpfa) {
36 this.comp_id = comp_id;
37 this.enviaSms = enviaSms;
38 this.enviaMailTfacfgm = enviaMailTfacfgm;
39 this.configMailCfgm = configMailCfgm;
40 this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
41 }
42
43 @EmbeddedId
44 public TfuncacompConfigmailTfacfgmPK getComp_id() {
45 return this.comp_id;
46 }
47
48 public void setComp_id(TfuncacompConfigmailTfacfgmPK comp_id) {
49 this.comp_id = comp_id;
50 }
51
52 @Column(name = "envia_sms", length = 1)
53 public String getEnviaSms() {
54 return this.enviaSms;
55 }
56
57 public void setEnviaSms(String enviaSms) {
58 this.enviaSms = enviaSms;
59 }
60
61 @Column(name = "envia_mail_tfacfgm", length = 1)
62 public String getEnviaMailTfacfgm() {
63 return this.enviaMailTfacfgm;
64 }
65
66 public void setEnviaMailTfacfgm(String enviaMailTfacfgm) {
67 this.enviaMailTfacfgm = enviaMailTfacfgm;
68 }
69
70 @ManyToOne(fetch = FetchType.LAZY)
71 @JoinColumn(name = "cod_cfg", insertable = false, updatable = false)
72 public ConfigMailCfgm getConfigMailCfgm() {
73 return this.configMailCfgm;
74 }
75
76 public void setConfigMailCfgm(ConfigMailCfgm configMailCfgm) {
77 this.configMailCfgm = configMailCfgm;
78 }
79
80 @ManyToOne(fetch = FetchType.LAZY)
81 @JoinColumn(name = "cod_tpfa", insertable = false, updatable = false)
82 public TipoFuncAcompTpfa getTipoFuncAcompTpfa() {
83 return this.tipoFuncAcompTpfa;
84 }
85
86 public void setTipoFuncAcompTpfa(TipoFuncAcompTpfa tipoFuncAcompTpfa) {
87 this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
88 }
89
90 public void atribuirPKPai() {
91 comp_id = new TfuncacompConfigmailTfacfgmPK();
92 comp_id.setConfigMailCfgm(this.getConfigMailCfgm());
93 comp_id.setTipoFuncAcompTpfa(this.getTipoFuncAcompTpfa().getTipoFuncAcompTpfa());
94 }
95
96 }