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.ManyToOne;
14 import javax.persistence.OneToMany;
15 import javax.persistence.Table;
16 import org.hibernate.annotations.GenericGenerator;
17
18
19
20
21 @Entity
22 @Table(name = "TB_TEXTOS_SITE_TXTS")
23 public class TextosSiteTxt implements java.io.Serializable {
24
25 private Long codTxtS;
26 private String textoTxts;
27 private String descricaoUsoTxts;
28 private String indAtivoTxts;
29 private String emailResponsavelTxts;
30 private IdiomaIdm idiomaIdm;
31 private EmpresaEmp empresaEmp;
32 private Set<ConfigMailCfgm> configMailSms = new HashSet<ConfigMailCfgm>(0);
33 private Set<ConfigMailCfgm> configMailMail = new HashSet<ConfigMailCfgm>(0);
34
35 public TextosSiteTxt() {
36 }
37
38 public TextosSiteTxt(String textoTxts, String descricaoUsoTxts, String indAtivoTxts, String emailResponsavelTxts, IdiomaIdm idiomaIdm, EmpresaEmp empresaEmp, Set<ConfigMailCfgm> configMailSms, Set<ConfigMailCfgm> configMailMail) {
39 this.textoTxts = textoTxts;
40 this.descricaoUsoTxts = descricaoUsoTxts;
41 this.indAtivoTxts = indAtivoTxts;
42 this.emailResponsavelTxts = emailResponsavelTxts;
43 this.idiomaIdm = idiomaIdm;
44 this.empresaEmp = empresaEmp;
45 this.configMailSms = configMailSms;
46 this.configMailMail = configMailMail;
47 }
48
49 @GenericGenerator(name = "generator", strategy = "increment")
50 @Id
51 @GeneratedValue(generator = "generator")
52 @Column(name = "cod_txts", nullable = false, length = 10)
53 public Long getCodTxtS() {
54 return this.codTxtS;
55 }
56
57 public void setCodTxtS(Long codTxtS) {
58 this.codTxtS = codTxtS;
59 }
60
61 @Column(name = "TEXTO_TXTS", length = 2000)
62 public String getTextoTxts() {
63 return this.textoTxts;
64 }
65
66 public void setTextoTxts(String textoTxts) {
67 this.textoTxts = textoTxts;
68 }
69
70 @Column(name = "DESCRICAO_USO_TXTS", length = 60)
71 public String getDescricaoUsoTxts() {
72 return this.descricaoUsoTxts;
73 }
74
75 public void setDescricaoUsoTxts(String descricaoUsoTxts) {
76 this.descricaoUsoTxts = descricaoUsoTxts;
77 }
78
79 @Column(name = "IND_ATIVO_TXTS", length = 1)
80 public String getIndAtivoTxts() {
81 return this.indAtivoTxts;
82 }
83
84 public void setIndAtivoTxts(String indAtivoTxts) {
85 this.indAtivoTxts = indAtivoTxts;
86 }
87
88 @Column(name = "email_responsavel_txts", length = 50)
89 public String getEmailResponsavelTxts() {
90 return this.emailResponsavelTxts;
91 }
92
93 public void setEmailResponsavelTxts(String emailResponsavelTxts) {
94 this.emailResponsavelTxts = emailResponsavelTxts;
95 }
96
97 @ManyToOne(fetch = FetchType.LAZY)
98 @JoinColumn(name = "COD_IDM")
99 public IdiomaIdm getIdiomaIdm() {
100 return this.idiomaIdm;
101 }
102
103 public void setIdiomaIdm(IdiomaIdm idiomaIdm) {
104 this.idiomaIdm = idiomaIdm;
105 }
106
107 @ManyToOne(fetch = FetchType.LAZY)
108 @JoinColumn(name = "COD_EMP")
109 public EmpresaEmp getEmpresaEmp() {
110 return this.empresaEmp;
111 }
112
113 public void setEmpresaEmp(EmpresaEmp empresaEmp) {
114 this.empresaEmp = empresaEmp;
115 }
116
117 @OneToMany(fetch = FetchType.LAZY, mappedBy = "textosSiteSms")
118 public Set<ConfigMailCfgm> getConfigMailSms() {
119 return this.configMailSms;
120 }
121
122 public void setConfigMailSms(Set<ConfigMailCfgm> configMailSms) {
123 this.configMailSms = configMailSms;
124 }
125
126 @OneToMany(fetch = FetchType.LAZY, mappedBy = "textosSiteMail")
127 public Set<ConfigMailCfgm> getConfigMailMail() {
128 return this.configMailMail;
129 }
130
131 public void setConfigMailMail(Set<ConfigMailCfgm> configMailMail) {
132 this.configMailMail = configMailMail;
133 }
134
135 }