1 package ecar.pojo;
2
3
4
5 import java.util.Date;
6 import javax.persistence.Column;
7 import javax.persistence.Entity;
8 import javax.persistence.FetchType;
9 import javax.persistence.GeneratedValue;
10 import javax.persistence.Id;
11 import javax.persistence.JoinColumn;
12 import javax.persistence.ManyToOne;
13 import javax.persistence.Table;
14 import javax.persistence.Temporal;
15 import javax.persistence.TemporalType;
16 import org.hibernate.annotations.GenericGenerator;
17
18
19
20
21 @Entity
22 @Table(name = "TB_APONTAMENTO_APT")
23 public class ApontamentoApt implements java.io.Serializable {
24
25 private Long codApt;
26 private Date dataInclusaoApt;
27 private String textoApt;
28 private ItemEstruturaIett itemEstruturaIett;
29 private UsuarioUsu usuarioUsu;
30 private PontoCriticoPtc pontoCriticoPtc;
31
32 public ApontamentoApt() {
33 }
34
35 public ApontamentoApt(Date dataInclusaoApt, String textoApt, ItemEstruturaIett itemEstruturaIett, UsuarioUsu usuarioUsu, PontoCriticoPtc pontoCriticoPtc) {
36 this.dataInclusaoApt = dataInclusaoApt;
37 this.textoApt = textoApt;
38 this.itemEstruturaIett = itemEstruturaIett;
39 this.usuarioUsu = usuarioUsu;
40 this.pontoCriticoPtc = pontoCriticoPtc;
41 }
42
43 @GenericGenerator(name = "generator", strategy = "increment")
44 @Id
45 @GeneratedValue(generator = "generator")
46 @Column(name = "COD_APT", nullable = false)
47 public Long getCodApt() {
48 return this.codApt;
49 }
50
51 public void setCodApt(Long codApt) {
52 this.codApt = codApt;
53 }
54
55 @Temporal(TemporalType.TIMESTAMP)
56 @Column(name = "DATA_INCLUSAO_APT", length = 7)
57 public Date getDataInclusaoApt() {
58 return this.dataInclusaoApt;
59 }
60
61 public void setDataInclusaoApt(Date dataInclusaoApt) {
62 this.dataInclusaoApt = dataInclusaoApt;
63 }
64
65 @Column(name = "TEXTO_APT", length = 2000)
66 public String getTextoApt() {
67 return this.textoApt;
68 }
69
70 public void setTextoApt(String textoApt) {
71 this.textoApt = textoApt;
72 }
73
74 @ManyToOne(fetch = FetchType.LAZY)
75 @JoinColumn(name = "COD_IETT")
76 public ItemEstruturaIett getItemEstruturaIett() {
77 return this.itemEstruturaIett;
78 }
79
80 public void setItemEstruturaIett(ItemEstruturaIett itemEstruturaIett) {
81 this.itemEstruturaIett = itemEstruturaIett;
82 }
83
84 @ManyToOne(fetch = FetchType.LAZY)
85 @JoinColumn(name = "COD_USU")
86 public UsuarioUsu getUsuarioUsu() {
87 return this.usuarioUsu;
88 }
89
90 public void setUsuarioUsu(UsuarioUsu usuarioUsu) {
91 this.usuarioUsu = usuarioUsu;
92 }
93
94 @ManyToOne(fetch = FetchType.LAZY)
95 @JoinColumn(name = "COD_PTC")
96 public PontoCriticoPtc getPontoCriticoPtc() {
97 return this.pontoCriticoPtc;
98 }
99
100 public void setPontoCriticoPtc(PontoCriticoPtc pontoCriticoPtc) {
101 this.pontoCriticoPtc = pontoCriticoPtc;
102 }
103
104 }