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_REG_CONTROLE_ACESSO_RCA")
23 public class RegControleAcessoRca implements java.io.Serializable {
24
25 private Long codRca;
26 private String tpContAcessoRca;
27 private Date dataAcessoRca;
28 private UsuarioUsu usuarioUsu;
29
30 public RegControleAcessoRca() {
31 }
32
33 public RegControleAcessoRca(String tpContAcessoRca, Date dataAcessoRca, UsuarioUsu usuarioUsu) {
34 this.tpContAcessoRca = tpContAcessoRca;
35 this.dataAcessoRca = dataAcessoRca;
36 this.usuarioUsu = usuarioUsu;
37 }
38
39 @GenericGenerator(name = "generator", strategy = "increment")
40 @Id
41 @GeneratedValue(generator = "generator")
42 @Column(name = "COD_RCA", nullable = false)
43 public Long getCodRca() {
44 return this.codRca;
45 }
46
47 public void setCodRca(Long codRca) {
48 this.codRca = codRca;
49 }
50
51 @Column(name = "TP_CONT_ACESSO_RCA", length = 1)
52 public String getTpContAcessoRca() {
53 return this.tpContAcessoRca;
54 }
55
56 public void setTpContAcessoRca(String tpContAcessoRca) {
57 this.tpContAcessoRca = tpContAcessoRca;
58 }
59
60 @Temporal(TemporalType.TIMESTAMP)
61 @Column(name = "DATA_ACESSO_RCA", length = 7)
62 public Date getDataAcessoRca() {
63 return this.dataAcessoRca;
64 }
65
66 public void setDataAcessoRca(Date dataAcessoRca) {
67 this.dataAcessoRca = dataAcessoRca;
68 }
69
70 @ManyToOne(fetch = FetchType.LAZY)
71 @JoinColumn(name = "COD_USU")
72 public UsuarioUsu getUsuarioUsu() {
73 return this.usuarioUsu;
74 }
75
76 public void setUsuarioUsu(UsuarioUsu usuarioUsu) {
77 this.usuarioUsu = usuarioUsu;
78 }
79
80 }