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_SEGMENTO_ITEM_LEIAUTE_SGTIL")
21 public class SegmentoItemLeiauteSgtil implements java.io.Serializable {
22
23 private Long codSgtil;
24 private String linkSgtil;
25 private String descricaoSgtil;
26 private Set<SegmentoItemSgti> segmentoItemSgtis = new HashSet<SegmentoItemSgti>(0);
27
28 public SegmentoItemLeiauteSgtil() {
29 }
30
31 public SegmentoItemLeiauteSgtil(String linkSgtil, String descricaoSgtil, Set<SegmentoItemSgti> segmentoItemSgtis) {
32 this.linkSgtil = linkSgtil;
33 this.descricaoSgtil = descricaoSgtil;
34 this.segmentoItemSgtis = segmentoItemSgtis;
35 }
36
37 @GenericGenerator(name = "generator", strategy = "increment")
38 @Id
39 @GeneratedValue(generator = "generator")
40 @Column(name = "COD_SGTIL", nullable = false)
41 public Long getCodSgtil() {
42 return this.codSgtil;
43 }
44
45 public void setCodSgtil(Long codSgtil) {
46 this.codSgtil = codSgtil;
47 }
48
49 @Column(name = "LINK_SGTIL", length = 100)
50 public String getLinkSgtil() {
51 return this.linkSgtil;
52 }
53
54 public void setLinkSgtil(String linkSgtil) {
55 this.linkSgtil = linkSgtil;
56 }
57
58 @Column(name = "DESCRICAO_SGTIL", length = 20)
59 public String getDescricaoSgtil() {
60 return this.descricaoSgtil;
61 }
62
63 public void setDescricaoSgtil(String descricaoSgtil) {
64 this.descricaoSgtil = descricaoSgtil;
65 }
66
67 @OneToMany(fetch = FetchType.LAZY, mappedBy = "segmentoItemLeiauteSgtil")
68 public Set<SegmentoItemSgti> getSegmentoItemSgtis() {
69 return this.segmentoItemSgtis;
70 }
71
72 public void setSegmentoItemSgtis(Set<SegmentoItemSgti> segmentoItemSgtis) {
73 this.segmentoItemSgtis = segmentoItemSgtis;
74 }
75
76 }