1 package ecar.pojo;
2
3
4
5 import javax.persistence.Column;
6 import javax.persistence.Entity;
7 import javax.persistence.FetchType;
8 import javax.persistence.GeneratedValue;
9 import javax.persistence.Id;
10 import javax.persistence.JoinColumn;
11 import javax.persistence.ManyToOne;
12 import javax.persistence.Table;
13 import org.hibernate.annotations.GenericGenerator;
14
15
16
17
18 @Entity
19 @Table(name = "TB_CONTATO_MAIL_CTTM")
20 public class ContatoMailCttm implements java.io.Serializable {
21
22 private Long codCttm;
23 private String nomeCttm;
24 private String indOrigemCttm;
25 private String emailCttm;
26 private ContatoAreaCtta contatoAreaCtta;
27 private ContatoMailCategoriaCttm contatoMailCategoriaCttm;
28
29 public ContatoMailCttm() {
30 }
31
32 public ContatoMailCttm(String nomeCttm, String indOrigemCttm, String emailCttm, ContatoAreaCtta contatoAreaCtta, ContatoMailCategoriaCttm contatoMailCategoriaCttm) {
33 this.nomeCttm = nomeCttm;
34 this.indOrigemCttm = indOrigemCttm;
35 this.emailCttm = emailCttm;
36 this.contatoAreaCtta = contatoAreaCtta;
37 this.contatoMailCategoriaCttm = contatoMailCategoriaCttm;
38 }
39
40 @GenericGenerator(name = "generator", strategy = "increment")
41 @Id
42 @GeneratedValue(generator = "generator")
43 @Column(name = "COD_CTTM", nullable = false)
44 public Long getCodCttm() {
45 return this.codCttm;
46 }
47
48 public void setCodCttm(Long codCttm) {
49 this.codCttm = codCttm;
50 }
51
52 @Column(name = "NOME_CTTM", length = 2000)
53 public String getNomeCttm() {
54 return this.nomeCttm;
55 }
56
57 public void setNomeCttm(String nomeCttm) {
58 this.nomeCttm = nomeCttm;
59 }
60
61 @Column(name = "IND_ORIGEM_CTTM", length = 1)
62 public String getIndOrigemCttm() {
63 return this.indOrigemCttm;
64 }
65
66 public void setIndOrigemCttm(String indOrigemCttm) {
67 this.indOrigemCttm = indOrigemCttm;
68 }
69
70 @Column(name = "EMAIL_CTTM", length = 50)
71 public String getEmailCttm() {
72 return this.emailCttm;
73 }
74
75 public void setEmailCttm(String emailCttm) {
76 this.emailCttm = emailCttm;
77 }
78
79 @ManyToOne(fetch = FetchType.LAZY)
80 @JoinColumn(name = "COD_CTTA")
81 public ContatoAreaCtta getContatoAreaCtta() {
82 return this.contatoAreaCtta;
83 }
84
85 public void setContatoAreaCtta(ContatoAreaCtta contatoAreaCtta) {
86 this.contatoAreaCtta = contatoAreaCtta;
87 }
88
89 @ManyToOne(fetch = FetchType.LAZY)
90 @JoinColumn(name = "COD_CTTMC")
91 public ContatoMailCategoriaCttm getContatoMailCategoriaCttm() {
92 return this.contatoMailCategoriaCttm;
93 }
94
95 public void setContatoMailCategoriaCttm(ContatoMailCategoriaCttm contatoMailCategoriaCttm) {
96 this.contatoMailCategoriaCttm = contatoMailCategoriaCttm;
97 }
98
99 }