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   * IettUsutpfuacrevIettutfar generated by hbm2java
17   */
18  @Entity
19  @Table(name = "tb_iett_usutpfuacrev_iettutfar")
20  public class IettUsutpfuacrevIettutfar implements java.io.Serializable, PaiFilho {
21  
22  	private static final long serialVersionUID = 4061039833827700887L;
23    
24  	private IettUsutpfuacrevIettutfarPK comp_id;
25  	private UsuarioUsu usuarioUsu;
26  	private ItemEstruturarevisaoIettrev itemEstruturarevisaoIettrev;
27  	private TipoFuncAcompTpfa tipoFuncAcompTpfa;
28  
29    public IettUsutpfuacrevIettutfar() {
30    }
31  
32    public IettUsutpfuacrevIettutfar(IettUsutpfuacrevIettutfarPK comp_id) {
33      this.comp_id = comp_id;
34    }
35  
36    public IettUsutpfuacrevIettutfar(IettUsutpfuacrevIettutfarPK comp_id, UsuarioUsu usuarioUsu, ItemEstruturarevisaoIettrev itemEstruturarevisaoIettrev, TipoFuncAcompTpfa tipoFuncAcompTpfa) {
37      this.comp_id = comp_id;
38      this.usuarioUsu = usuarioUsu;
39      this.itemEstruturarevisaoIettrev = itemEstruturarevisaoIettrev;
40      this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
41    }
42  
43    @EmbeddedId
44    @AttributeOverrides( { @AttributeOverride(name = "codTpfa", column = @Column(name = "cod_tpfa", nullable = false, length = 4)), @AttributeOverride(name = "codIettrev", column = @Column(name = "cod_iettrev", nullable = false, length = 4)), @AttributeOverride(name = "codUsu", column = @Column(name = "cod_usu", nullable = false, length = 4)) })
45    public IettUsutpfuacrevIettutfarPK getComp_id() {
46      return this.comp_id;
47    }
48  
49    public void setComp_id(IettUsutpfuacrevIettutfarPK comp_id) {
50      this.comp_id = comp_id;
51    }
52  
53    @ManyToOne(fetch = FetchType.LAZY)
54    @JoinColumn(name = "cod_usu", insertable = false, updatable = false)
55    public UsuarioUsu getUsuarioUsu() {
56      return this.usuarioUsu;
57    }
58  
59    public void setUsuarioUsu(UsuarioUsu usuarioUsu) {
60      this.usuarioUsu = usuarioUsu;
61    }
62  
63    @ManyToOne(fetch = FetchType.LAZY)
64    @JoinColumn(name = "cod_iettrev", insertable = false, updatable = false)
65    public ItemEstruturarevisaoIettrev getItemEstruturarevisaoIettrev() {
66      return this.itemEstruturarevisaoIettrev;
67    }
68  
69    public void setItemEstruturarevisaoIettrev(ItemEstruturarevisaoIettrev itemEstruturarevisaoIettrev) {
70      this.itemEstruturarevisaoIettrev = itemEstruturarevisaoIettrev;
71    }
72  
73    @ManyToOne(fetch = FetchType.LAZY)
74    @JoinColumn(name = "cod_tpfa", insertable = false, updatable = false)
75    public TipoFuncAcompTpfa getTipoFuncAcompTpfa() {
76      return this.tipoFuncAcompTpfa;
77    }
78  
79    public void setTipoFuncAcompTpfa(TipoFuncAcompTpfa tipoFuncAcompTpfa) {
80      this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
81    }
82  
83  
84    public void atribuirPKPai() {
85  	  comp_id = new IettUsutpfuacrevIettutfarPK();        
86  	  comp_id.setCodIettrev(this.getItemEstruturarevisaoIettrev().getCodIettrev());
87  	  comp_id.setCodTpfa(this.getTipoFuncAcompTpfa().getCodTpfa());
88  	  comp_id.setCodUsu(this.getUsuarioUsu().getCodUsu());
89  	
90    }
91  
92  }