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   * TipoAcompAbasSisatributoTaAbaSatb generated by hbm2java
17   */
18  @Entity
19  @Table(name = "tb_tipoacomp_abas_sisatributo_taabasatb")
20  public class TipoAcompAbasSisatributoTaAbaSatb implements java.io.Serializable, PaiFilho {
21  
22    private static final long serialVersionUID = -844274404772998860L;
23  
24    private TipoAcompAbasSisatributoTaAbaSatbId id;
25    private Aba abas;
26    private SisAtributoSatb sisAtributoSatb;
27    private TipoAcompanhamentoTa tipoAcompanhamentoTa;
28    private String indVisualizaAba;
29  
30    public TipoAcompAbasSisatributoTaAbaSatb() {
31    }
32  
33    public TipoAcompAbasSisatributoTaAbaSatb(TipoAcompAbasSisatributoTaAbaSatbId id, Aba abas, SisAtributoSatb sisAtributoSatb, TipoAcompanhamentoTa tipoAcompanhamentoTa) {
34      this.id = id;
35      this.abas = abas;
36      this.sisAtributoSatb = sisAtributoSatb;
37      this.tipoAcompanhamentoTa = tipoAcompanhamentoTa;
38    }
39    
40    public TipoAcompAbasSisatributoTaAbaSatb(TipoAcompanhamentoTa tipoAcompanhamentoTa, Aba abas, SisAtributoSatb sisAtributoSatb) {
41  	this.id = new TipoAcompAbasSisatributoTaAbaSatbId(tipoAcompanhamentoTa.getCodTa(),abas.getCodAba(),sisAtributoSatb.getCodSatb());
42    }
43  
44    public TipoAcompAbasSisatributoTaAbaSatb(TipoAcompAbasSisatributoTaAbaSatbId id, Aba abas, SisAtributoSatb sisAtributoSatb, TipoAcompanhamentoTa tipoAcompanhamentoTa, String indVisualizaAba) {
45      this.id = id;
46      this.abas = abas;
47      this.sisAtributoSatb = sisAtributoSatb;
48      this.tipoAcompanhamentoTa = tipoAcompanhamentoTa;
49      this.indVisualizaAba = indVisualizaAba;
50    }
51      
52    @EmbeddedId
53    @AttributeOverrides( { @AttributeOverride(name = "codTa", column = @Column(name = "cod_ta", nullable = false)), @AttributeOverride(name = "codAba", column = @Column(name = "cod_aba", nullable = false)), @AttributeOverride(name = "codSatb", column = @Column(name = "cod_satb", nullable = false)) })
54    public TipoAcompAbasSisatributoTaAbaSatbId getId() {
55      return this.id;
56    }
57  
58    public void setId(TipoAcompAbasSisatributoTaAbaSatbId id) {
59      this.id = id;
60    }
61  
62    @ManyToOne(fetch = FetchType.LAZY)
63    @JoinColumn(name = "cod_aba", nullable = false, insertable = false, updatable = false)
64    public Aba getAbas() {
65      return this.abas;
66    }
67  
68    public void setAbas(Aba abas) {
69      this.abas = abas;
70    }
71  
72    @ManyToOne(fetch = FetchType.LAZY)
73    @JoinColumn(name = "cod_satb", nullable = false, insertable = false, updatable = false)
74    public SisAtributoSatb getSisAtributoSatb() {
75      return this.sisAtributoSatb;
76    }
77  
78    public void setSisAtributoSatb(SisAtributoSatb sisAtributoSatb) {
79      this.sisAtributoSatb = sisAtributoSatb;
80    }
81  
82    @ManyToOne(fetch = FetchType.LAZY)
83    @JoinColumn(name = "cod_ta", nullable = false, insertable = false, updatable = false)
84    public TipoAcompanhamentoTa getTipoAcompanhamentoTa() {
85      return this.tipoAcompanhamentoTa;
86    }
87  
88    public void setTipoAcompanhamentoTa(TipoAcompanhamentoTa tipoAcompanhamentoTa) {
89      this.tipoAcompanhamentoTa = tipoAcompanhamentoTa;
90    }
91  
92    @Column(name = "ind_visualiza_aba", length = 1)
93    public String getIndVisualizaAba() {
94      return this.indVisualizaAba;
95    }
96  
97    public void setIndVisualizaAba(String indVisualizaAba) {
98      this.indVisualizaAba = indVisualizaAba;
99    }
100 
101   public void atribuirPKPai() {
102 	id = new TipoAcompAbasSisatributoTaAbaSatbId();
103 	id.setCodTa(this.getTipoAcompanhamentoTa().getCodTa());
104 	id.setCodAba(this.getAbas().getCodAba());
105 	id.setCodSatb(this.getSisAtributoSatb().getCodSatb());
106 	
107   }
108 
109 }