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_PRIORIDADE_PRIOR")
21 public class PrioridadePrior implements java.io.Serializable {
22
23 private Long codPrior;
24 private String descricaoPrior;
25 private Set<RegDemandaRegd> regDemandaRegds = new HashSet<RegDemandaRegd>(0);
26
27 public PrioridadePrior() {
28 }
29
30 public PrioridadePrior(String descricaoPrior, Set<RegDemandaRegd> regDemandaRegds) {
31 this.descricaoPrior = descricaoPrior;
32 this.regDemandaRegds = regDemandaRegds;
33 }
34
35 @GenericGenerator(name = "generator", strategy = "increment")
36 @Id
37 @GeneratedValue(generator = "generator")
38 @Column(name = "COD_PRIOR", nullable = false)
39 public Long getCodPrior() {
40 return this.codPrior;
41 }
42
43 public void setCodPrior(Long codPrior) {
44 this.codPrior = codPrior;
45 }
46
47 @Column(name = "DESCRICAO_PRIOR", length = 20)
48 public String getDescricaoPrior() {
49 return this.descricaoPrior;
50 }
51
52 public void setDescricaoPrior(String descricaoPrior) {
53 this.descricaoPrior = descricaoPrior;
54 }
55
56 @OneToMany(fetch = FetchType.LAZY, mappedBy = "prioridadePrior")
57 public Set<RegDemandaRegd> getRegDemandaRegds() {
58 return this.regDemandaRegds;
59 }
60
61 public void setRegDemandaRegds(Set<RegDemandaRegd> regDemandaRegds) {
62 this.regDemandaRegds = regDemandaRegds;
63 }
64
65 }