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 javax.persistence.AttributeOverride;
7   import javax.persistence.AttributeOverrides;
8   import javax.persistence.Column;
9   import javax.persistence.EmbeddedId;
10  import javax.persistence.Entity;
11  import javax.persistence.FetchType;
12  import javax.persistence.JoinColumn;
13  import javax.persistence.ManyToOne;
14  import javax.persistence.Table;
15  import javax.persistence.Temporal;
16  import javax.persistence.TemporalType;
17  
18  /**
19   * AcompRefItemLimitesArli generated by hbm2java
20   */
21  @Entity
22  @Table(name = "TB_ACOMP_REF_ITEM_LIMITES_ARLI")
23  public class AcompRefItemLimitesArli implements java.io.Serializable, PaiFilho {
24  
25    private static final long serialVersionUID = 8118571962577797588L;
26    
27    private AcompRefItemLimitesArliPK comp_id;
28    private Date dataLimiteArli;
29    private AcompReferenciaItemAri acompReferenciaItemAri;
30    private TipoFuncAcompTpfa tipoFuncAcompTpfa;
31  
32    public AcompRefItemLimitesArli() {
33    }
34  
35    public AcompRefItemLimitesArli(AcompRefItemLimitesArliPK comp_id) {
36      this.comp_id = comp_id;
37    }
38  
39    public AcompRefItemLimitesArli(AcompRefItemLimitesArliPK comp_id, Date dataLimiteArli, AcompReferenciaItemAri acompReferenciaItemAri, TipoFuncAcompTpfa tipoFuncAcompTpfa) {
40      this.comp_id = comp_id;
41      this.dataLimiteArli = dataLimiteArli;
42      this.acompReferenciaItemAri = acompReferenciaItemAri;
43      this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
44    }
45  
46    @EmbeddedId
47    @AttributeOverrides( { @AttributeOverride(name = "codAri", column = @Column(name = "COD_ARI", nullable = false, length = 10)), @AttributeOverride(name = "codTpfa", column = @Column(name = "COD_TPFA", nullable = false, length = 10)) })
48    public AcompRefItemLimitesArliPK getComp_id() {
49      return this.comp_id;
50    }
51  
52    public void setComp_id(AcompRefItemLimitesArliPK comp_id) {
53      this.comp_id = comp_id;
54    }
55  
56    @Temporal(TemporalType.TIMESTAMP)
57    @Column(name = "DATA_LIMITE_ARLI", length = 7)
58    public Date getDataLimiteArli() {
59      return this.dataLimiteArli;
60    }
61  
62    public void setDataLimiteArli(Date dataLimiteArli) {
63      this.dataLimiteArli = dataLimiteArli;
64    }
65  
66    @ManyToOne(fetch = FetchType.LAZY)
67    @JoinColumn(name = "COD_ARI", insertable = false, updatable = false)
68    public AcompReferenciaItemAri getAcompReferenciaItemAri() {
69      return this.acompReferenciaItemAri;
70    }
71  
72    public void setAcompReferenciaItemAri(AcompReferenciaItemAri acompReferenciaItemAri) {
73      this.acompReferenciaItemAri = acompReferenciaItemAri;
74    }
75  
76    @ManyToOne(fetch = FetchType.LAZY)
77    @JoinColumn(name = "COD_TPFA", insertable = false, updatable = false)
78    public TipoFuncAcompTpfa getTipoFuncAcompTpfa() {
79      return this.tipoFuncAcompTpfa;
80    }
81  
82    public void setTipoFuncAcompTpfa(TipoFuncAcompTpfa tipoFuncAcompTpfa) {
83      this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
84    }
85  
86    public void atribuirPKPai() {
87      comp_id = new AcompRefItemLimitesArliPK();
88      comp_id.setCodAri(this.getAcompReferenciaItemAri().getCodAri());
89      comp_id.setCodTpfa(this.getTipoFuncAcompTpfa().getCodTpfa());
90    }
91  
92  }