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_PERIODO_REVISAO_PREV")
23 public class PeriodoRevisaoPrev implements java.io.Serializable {
24
25 private Long codPrev;
26 private Date dtInicioPrev;
27 private String descricaoPrev;
28 private Date dtFimPrev;
29 private ConfiguracaoCfg configuracaoCfg;
30
31 public PeriodoRevisaoPrev() {
32 }
33
34 public PeriodoRevisaoPrev(Date dtInicioPrev, String descricaoPrev, Date dtFimPrev, ConfiguracaoCfg configuracaoCfg) {
35 this.dtInicioPrev = dtInicioPrev;
36 this.descricaoPrev = descricaoPrev;
37 this.dtFimPrev = dtFimPrev;
38 this.configuracaoCfg = configuracaoCfg;
39 }
40
41 @GenericGenerator(name = "generator", strategy = "increment")
42 @Id
43 @GeneratedValue(generator = "generator")
44 @Column(name = "COD_PREV", nullable = false)
45 public Long getCodPrev() {
46 return this.codPrev;
47 }
48
49 public void setCodPrev(Long codPrev) {
50 this.codPrev = codPrev;
51 }
52
53 @Temporal(TemporalType.TIMESTAMP)
54 @Column(name = "DT_INICIO_PREV")
55 public Date getDtInicioPrev() {
56 return this.dtInicioPrev;
57 }
58
59 public void setDtInicioPrev(Date dtInicioPrev) {
60 this.dtInicioPrev = dtInicioPrev;
61 }
62
63 @Column(name = "DESCRICAO_PREV", length = 30)
64 public String getDescricaoPrev() {
65 return this.descricaoPrev;
66 }
67
68 public void setDescricaoPrev(String descricaoPrev) {
69 this.descricaoPrev = descricaoPrev;
70 }
71
72 @Temporal(TemporalType.TIMESTAMP)
73 @Column(name = "DT_FIM_PREV")
74 public Date getDtFimPrev() {
75 return this.dtFimPrev;
76 }
77
78 public void setDtFimPrev(Date dtFimPrev) {
79 this.dtFimPrev = dtFimPrev;
80 }
81
82 @ManyToOne(fetch = FetchType.LAZY)
83 @JoinColumn(name = "COD_CFG")
84 public ConfiguracaoCfg getConfiguracaoCfg() {
85 return this.configuracaoCfg;
86 }
87
88 public void setConfiguracaoCfg(ConfiguracaoCfg configuracaoCfg) {
89 this.configuracaoCfg = configuracaoCfg;
90 }
91
92 }