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_CONTATO_MAIL_CATEGORIA_CTTM")
21 public class ContatoMailCategoriaCttm implements java.io.Serializable {
22
23 private Long codCttmc;
24 private String descricaoCttmc;
25 private Set<ContatoMailCttm> contatoMailCttms = new HashSet<ContatoMailCttm>(0);
26
27 public ContatoMailCategoriaCttm() {
28 }
29
30 public ContatoMailCategoriaCttm(String descricaoCttmc, Set<ContatoMailCttm> contatoMailCttms) {
31 this.descricaoCttmc = descricaoCttmc;
32 this.contatoMailCttms = contatoMailCttms;
33 }
34
35 @GenericGenerator(name = "generator", strategy = "increment")
36 @Id
37 @GeneratedValue(generator = "generator")
38 @Column(name = "COD_CTTMC", nullable = false)
39 public Long getCodCttmc() {
40 return this.codCttmc;
41 }
42
43 public void setCodCttmc(Long codCttmc) {
44 this.codCttmc = codCttmc;
45 }
46
47 @Column(name = "DESCRICAO_CTTMC", length = 30)
48 public String getDescricaoCttmc() {
49 return this.descricaoCttmc;
50 }
51
52 public void setDescricaoCttmc(String descricaoCttmc) {
53 this.descricaoCttmc = descricaoCttmc;
54 }
55
56 @OneToMany(fetch = FetchType.LAZY, mappedBy = "contatoMailCategoriaCttm")
57 public Set<ContatoMailCttm> getContatoMailCttms() {
58 return this.contatoMailCttms;
59 }
60
61 public void setContatoMailCttms(Set<ContatoMailCttm> contatoMailCttms) {
62 this.contatoMailCttms = contatoMailCttms;
63 }
64
65 }