View Javadoc

1   package ecar.pojo;
2   
3   // Generated Aug 13, 2009 2:24:15 PM by Hibernate Tools 3.2.0.CR1
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.JoinColumn;
13  import javax.persistence.ManyToOne;
14  import javax.persistence.OneToMany;
15  import javax.persistence.Table;
16  import org.hibernate.annotations.GenericGenerator;
17  
18  /**
19   * HistoricoMotivo generated by hbm2java
20   */
21  @Entity
22  @Table(name = "tb_historico_motivo_moh")
23  public class HistoricoMotivo implements java.io.Serializable {
24  
25    private static final long serialVersionUID = -7601113366194227208L;
26  
27    private Long codMoh;
28    private HistoricoGrupoMotivo historicoGrupoMotivo;
29    private String descricao;
30    private String siglaTabelaAfetada;
31    private Integer codAcaoMoh;
32    private Set<HistoricoMaster> historicoMasters = new HashSet<HistoricoMaster>(0);
33  
34    public HistoricoMotivo() {
35    }
36  
37    public HistoricoMotivo(HistoricoGrupoMotivo historicoGrupoMotivo, String descricao, String siglaTabelaAfetada, Integer codAcaoMoh, Set<HistoricoMaster> historicoMasters) {
38      this.historicoGrupoMotivo = historicoGrupoMotivo;
39      this.descricao = descricao;
40      this.siglaTabelaAfetada = siglaTabelaAfetada;
41      this.codAcaoMoh = codAcaoMoh;
42      this.historicoMasters = historicoMasters;
43    }
44  
45    @GenericGenerator(name = "generator", strategy = "increment")
46    @Id
47    @GeneratedValue(generator = "generator")
48    @Column(name = "cod_moh", nullable = false)
49    public Long getCodMoh() {
50      return this.codMoh;
51    }
52  
53    public void setCodMoh(Long codMoh) {
54      this.codMoh = codMoh;
55    }
56  
57    @ManyToOne(fetch = FetchType.LAZY)
58    @JoinColumn(name = "cod_gmh")
59    public HistoricoGrupoMotivo getHistoricoGrupoMotivo() {
60      return this.historicoGrupoMotivo;
61    }
62  
63    public void setHistoricoGrupoMotivo(HistoricoGrupoMotivo historicoGrupoMotivo) {
64      this.historicoGrupoMotivo = historicoGrupoMotivo;
65    }
66  
67    @Column(name = "descricao", length = 100)
68    public String getDescricao() {
69      return this.descricao;
70    }
71  
72    public void setDescricao(String descricao) {
73      this.descricao = descricao;
74    }
75  
76    @Column(name = "sigla_tabela_afetada", length = 20)
77    public String getSiglaTabelaAfetada() {
78      return this.siglaTabelaAfetada;
79    }
80  
81    public void setSiglaTabelaAfetada(String siglaTabelaAfetada) {
82      this.siglaTabelaAfetada = siglaTabelaAfetada;
83    }
84  
85    @Column(name = "cod_acao_moh", length = 20)
86    public Integer getCodAcaoMoh() {
87      return this.codAcaoMoh;
88    }
89  
90    public void setCodAcaoMoh(Integer codAcaoMoh) {
91      this.codAcaoMoh = codAcaoMoh;
92    }
93  
94    @OneToMany(fetch = FetchType.LAZY, mappedBy = "historicoMotivo")
95    public Set<HistoricoMaster> getHistoricoMasters() {
96      return this.historicoMasters;
97    }
98  
99    public void setHistoricoMasters(Set<HistoricoMaster> historicoMasters) {
100     this.historicoMasters = historicoMasters;
101   }
102 
103 }