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 javax.persistence.AttributeOverride;
6   import javax.persistence.AttributeOverrides;
7   import javax.persistence.Column;
8   import javax.persistence.EmbeddedId;
9   import javax.persistence.Entity;
10  import javax.persistence.FetchType;
11  import javax.persistence.JoinColumn;
12  import javax.persistence.ManyToOne;
13  import javax.persistence.Table;
14  
15  /**
16   * TipoAcompFuncAcompTafc generated by hbm2java
17   */
18  @Entity
19  @Table(name = "TB_TIPO_ACOMP_FUNC_ACOMP_TAFC")
20  public class TipoAcompFuncAcompTafc implements java.io.Serializable, PaiFilho {
21  
22    private static final long serialVersionUID = -6924986548179669358L;
23  
24    private TipoAcompFuncAcompPK comp_id;
25    private String indObrigatorio;
26    private String indOpcional;
27    private String indRegistroPosicaoTafc;
28    private String indLeituraTipoAcomp;
29    private TipoAcompanhamentoTa tipoAcompanhamentoTa;
30    private TipoFuncAcompTpfa tipoFuncAcompTpfa;
31  
32    public TipoAcompFuncAcompTafc() {
33    }
34  
35    public TipoAcompFuncAcompTafc(TipoAcompFuncAcompPK comp_id) {
36      this.comp_id = comp_id;
37    }
38  
39    public TipoAcompFuncAcompTafc(TipoAcompFuncAcompPK comp_id, String indObrigatorio, String indOpcional, String indRegistroPosicaoTafc, String indLeituraTipoAcomp, TipoAcompanhamentoTa tipoAcompanhamentoTa, TipoFuncAcompTpfa tipoFuncAcompTpfa) {
40      this.comp_id = comp_id;
41      this.indObrigatorio = indObrigatorio;
42      this.indOpcional = indOpcional;
43      this.indRegistroPosicaoTafc = indRegistroPosicaoTafc;
44      this.indLeituraTipoAcomp = indLeituraTipoAcomp;
45      this.tipoAcompanhamentoTa = tipoAcompanhamentoTa;
46      this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
47    }
48  
49    @EmbeddedId
50    @AttributeOverrides( { @AttributeOverride(name = "codTa", column = @Column(name = "COD_TA", nullable = false, length = 10)), @AttributeOverride(name = "codTpfa", column = @Column(name = "COD_TPFA", nullable = false, length = 10)) })
51    public TipoAcompFuncAcompPK getComp_id() {
52      return this.comp_id;
53    }
54  
55    public void setComp_id(TipoAcompFuncAcompPK comp_id) {
56      this.comp_id = comp_id;
57    }
58  
59    @Column(name = "IND_OBRIGATORIO", length = 1)
60    public String getIndObrigatorio() {
61      return this.indObrigatorio;
62    }
63  
64    public void setIndObrigatorio(String indObrigatorio) {
65      this.indObrigatorio = indObrigatorio;
66    }
67  
68    @Column(name = "IND_OPCIONAL", length = 1)
69    public String getIndOpcional() {
70      return this.indOpcional;
71    }
72  
73    public void setIndOpcional(String indOpcional) {
74      this.indOpcional = indOpcional;
75    }
76  
77    @Column(name = "IND_REGISTRO_POSICAO_TAFC", length = 1)
78    public String getIndRegistroPosicaoTafc() {
79      return this.indRegistroPosicaoTafc;
80    }
81  
82    public void setIndRegistroPosicaoTafc(String indRegistroPosicaoTafc) {
83      this.indRegistroPosicaoTafc = indRegistroPosicaoTafc;
84    }
85  
86    @Column(name = "ind_leitura_tipo_acomp", length = 1)
87    public String getIndLeituraTipoAcomp() {
88      return this.indLeituraTipoAcomp;
89    }
90  
91    public void setIndLeituraTipoAcomp(String indLeituraTipoAcomp) {
92      this.indLeituraTipoAcomp = indLeituraTipoAcomp;
93    }
94  
95    @ManyToOne(fetch = FetchType.LAZY)
96    @JoinColumn(name = "COD_TA", insertable = false, updatable = false)
97    public TipoAcompanhamentoTa getTipoAcompanhamentoTa() {
98      return this.tipoAcompanhamentoTa;
99    }
100 
101   public void setTipoAcompanhamentoTa(TipoAcompanhamentoTa tipoAcompanhamentoTa) {
102     this.tipoAcompanhamentoTa = tipoAcompanhamentoTa;
103   }
104 
105   @ManyToOne(fetch = FetchType.LAZY)
106   @JoinColumn(name = "COD_TPFA", insertable = false, updatable = false)
107   public TipoFuncAcompTpfa getTipoFuncAcompTpfa() {
108     return this.tipoFuncAcompTpfa;
109   }
110 
111   public void setTipoFuncAcompTpfa(TipoFuncAcompTpfa tipoFuncAcompTpfa) {
112     this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
113   }
114 
115   public void atribuirPKPai() {
116 	  comp_id = new TipoAcompFuncAcompPK();
117 	  comp_id.setCodTa(this.getTipoAcompanhamentoTa().getCodTa());
118 	  comp_id.setCodTpfa(this.getTipoFuncAcompTpfa().getCodTpfa());
119   }
120 
121 }