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.Date;
6   import java.util.HashSet;
7   import java.util.Set;
8   import javax.persistence.Column;
9   import javax.persistence.Entity;
10  import javax.persistence.FetchType;
11  import javax.persistence.GeneratedValue;
12  import javax.persistence.Id;
13  import javax.persistence.JoinColumn;
14  import javax.persistence.ManyToOne;
15  import javax.persistence.OneToMany;
16  import javax.persistence.Table;
17  import javax.persistence.Temporal;
18  import javax.persistence.TemporalType;
19  import org.hibernate.annotations.Cascade;
20  import org.hibernate.annotations.CascadeType;
21  import org.hibernate.annotations.GenericGenerator;
22  
23  /**
24   * RegApontamentoRegda generated by hbm2java
25   */
26  @Entity
27  @Table(name = "TB_REG_APONTAMENTO_REGDA")
28  public class RegApontamentoRegda implements java.io.Serializable {
29  
30    private Long codRegda;
31    private Date dataRegda;
32    private String infoRegda;
33    private RegDemandaRegd regDemandaRegd;
34    private UsuarioUsu usuarioUsu;
35    private Set<ApontamentoAnexo> anexos = new HashSet<ApontamentoAnexo>(0);
36  
37    public RegApontamentoRegda() {
38    }
39  
40    public RegApontamentoRegda(Date dataRegda, String infoRegda, RegDemandaRegd regDemandaRegd, UsuarioUsu usuarioUsu, Set<ApontamentoAnexo> anexos) {
41      this.dataRegda = dataRegda;
42      this.infoRegda = infoRegda;
43      this.regDemandaRegd = regDemandaRegd;
44      this.usuarioUsu = usuarioUsu;
45      this.anexos = anexos;
46    }
47  
48    @GenericGenerator(name = "generator", strategy = "increment")
49    @Id
50    @GeneratedValue(generator = "generator")
51    @Column(name = "COD_REGDA", nullable = false)
52    public Long getCodRegda() {
53      return this.codRegda;
54    }
55  
56    public void setCodRegda(Long codRegda) {
57      this.codRegda = codRegda;
58    }
59  
60    @Temporal(TemporalType.TIMESTAMP)
61    @Column(name = "DATA_REGDA", length = 7)
62    public Date getDataRegda() {
63      return this.dataRegda;
64    }
65  
66    public void setDataRegda(Date dataRegda) {
67      this.dataRegda = dataRegda;
68    }
69  
70    @Column(name = "INFO_REGDA", length = 200)
71    public String getInfoRegda() {
72      return this.infoRegda;
73    }
74  
75    public void setInfoRegda(String infoRegda) {
76      this.infoRegda = infoRegda;
77    }
78  
79    @ManyToOne(fetch = FetchType.LAZY)
80    @JoinColumn(name = "COD_REGD")
81    public RegDemandaRegd getRegDemandaRegd() {
82      return this.regDemandaRegd;
83    }
84  
85    public void setRegDemandaRegd(RegDemandaRegd regDemandaRegd) {
86      this.regDemandaRegd = regDemandaRegd;
87    }
88  
89    @ManyToOne(fetch = FetchType.LAZY)
90    @JoinColumn(name = "COD_USU")
91    public UsuarioUsu getUsuarioUsu() {
92      return this.usuarioUsu;
93    }
94  
95    public void setUsuarioUsu(UsuarioUsu usuarioUsu) {
96      this.usuarioUsu = usuarioUsu;
97    }
98  
99    @OneToMany(fetch = FetchType.LAZY, mappedBy = "regApontamentoRegda")
100   @Cascade( { CascadeType.ALL, CascadeType.DELETE_ORPHAN })
101   public Set<ApontamentoAnexo> getAnexos() {
102     return this.anexos;
103   }
104 
105   public void setAnexos(Set<ApontamentoAnexo> anexos) {
106     this.anexos = anexos;
107   }
108 
109 }