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.math.BigDecimal;
6   import java.util.Date;
7   import javax.persistence.AttributeOverride;
8   import javax.persistence.AttributeOverrides;
9   import javax.persistence.Column;
10  import javax.persistence.EmbeddedId;
11  import javax.persistence.Entity;
12  import javax.persistence.FetchType;
13  import javax.persistence.JoinColumn;
14  import javax.persistence.ManyToOne;
15  import javax.persistence.Table;
16  
17  /**
18   * ItemEstrtBenefIettb generated by hbm2java
19   */
20  @Entity
21  @Table(name = "TB_ITEM_ESTRT_BENEF_IETTB")
22  public class ItemEstrtBenefIettb implements java.io.Serializable, PaiFilho {
23  
24    private static final long serialVersionUID = 3520332586672370864L;
25    
26    private ItemEstrtBenefIettbPK comp_id;
27    private Date dataUltManutencaoIettb;
28    private String comentarioIettb;
29    private BigDecimal qtdPrevistaIettb;
30    private Boolean indExclusaoPosHistorico;
31    private BeneficiarioBnf beneficiarioBnf;
32    private ItemEstruturaIett itemEstruturaIett;
33    private UsuarioUsu usuarioUsuManutencao;
34  
35    public ItemEstrtBenefIettb() {
36    }
37  
38    public ItemEstrtBenefIettb(ItemEstrtBenefIettbPK comp_id) {
39      this.comp_id = comp_id;
40    }
41  
42    public ItemEstrtBenefIettb(ItemEstrtBenefIettbPK comp_id, Date dataUltManutencaoIettb, String comentarioIettb, BigDecimal qtdPrevistaIettb, Boolean indExclusaoPosHistorico, BeneficiarioBnf beneficiarioBnf, ItemEstruturaIett itemEstruturaIett, UsuarioUsu usuarioUsuManutencao) {
43      this.comp_id = comp_id;
44      this.dataUltManutencaoIettb = dataUltManutencaoIettb;
45      this.comentarioIettb = comentarioIettb;
46      this.qtdPrevistaIettb = qtdPrevistaIettb;
47      this.indExclusaoPosHistorico = indExclusaoPosHistorico;
48      this.beneficiarioBnf = beneficiarioBnf;
49      this.itemEstruturaIett = itemEstruturaIett;
50      this.usuarioUsuManutencao = usuarioUsuManutencao;
51    }
52  
53    @EmbeddedId
54    @AttributeOverrides( { @AttributeOverride(name = "codIett", column = @Column(name = "COD_IETT", nullable = false, length = 10)), @AttributeOverride(name = "codBnf", column = @Column(name = "COD_BNF", nullable = false, length = 10)) })
55    public ItemEstrtBenefIettbPK getComp_id() {
56      return this.comp_id;
57    }
58  
59    public void setComp_id(ItemEstrtBenefIettbPK comp_id) {
60      this.comp_id = comp_id;
61    }
62  
63    @Column(name = "DATA_ULT_MANUTENCAO_IETTB", length = 7)
64    public Date getDataUltManutencaoIettb() {
65      return this.dataUltManutencaoIettb;
66    }
67  
68    public void setDataUltManutencaoIettb(Date dataUltManutencaoIettb) {
69      this.dataUltManutencaoIettb = dataUltManutencaoIettb;
70    }
71  
72    @Column(name = "COMENTARIO_IETTB", length = 2000)
73    public String getComentarioIettb() {
74      return this.comentarioIettb;
75    }
76  
77    public void setComentarioIettb(String comentarioIettb) {
78      this.comentarioIettb = comentarioIettb;
79    }
80  
81    @Column(name = "QTD_PREVISTA_IETTB", length = 14)
82    public BigDecimal getQtdPrevistaIettb() {
83      return this.qtdPrevistaIettb;
84    }
85  
86    public void setQtdPrevistaIettb(BigDecimal qtdPrevistaIettb) {
87      this.qtdPrevistaIettb = qtdPrevistaIettb;
88    }
89  
90    @Column(name = "IND_EXCLUSAO_POS_HISTORICO")
91    public Boolean getIndExclusaoPosHistorico() {
92      return this.indExclusaoPosHistorico;
93    }
94  
95    public void setIndExclusaoPosHistorico(Boolean indExclusaoPosHistorico) {
96      this.indExclusaoPosHistorico = indExclusaoPosHistorico;
97    }
98  
99    @ManyToOne(fetch = FetchType.LAZY)
100   @JoinColumn(name = "COD_BNF", insertable = false, updatable = false)
101   public BeneficiarioBnf getBeneficiarioBnf() {
102     return this.beneficiarioBnf;
103   }
104 
105   public void setBeneficiarioBnf(BeneficiarioBnf beneficiarioBnf) {
106     this.beneficiarioBnf = beneficiarioBnf;
107   }
108 
109   @ManyToOne(fetch = FetchType.LAZY)
110   @JoinColumn(name = "COD_IETT", insertable = false, updatable = false)
111   public ItemEstruturaIett getItemEstruturaIett() {
112     return this.itemEstruturaIett;
113   }
114 
115   public void setItemEstruturaIett(ItemEstruturaIett itemEstruturaIett) {
116     this.itemEstruturaIett = itemEstruturaIett;
117   }
118 
119   @ManyToOne(fetch = FetchType.LAZY)
120   @JoinColumn(name = "COD_USU_MANUTENCAO")
121   public UsuarioUsu getUsuarioUsuManutencao() {
122     return this.usuarioUsuManutencao;
123   }
124 
125   public void setUsuarioUsuManutencao(UsuarioUsu usuarioUsuManutencao) {
126     this.usuarioUsuManutencao = usuarioUsuManutencao;
127   }
128 
129   public void atribuirPKPai() {
130 	  comp_id = new ItemEstrtBenefIettbPK();
131 	  comp_id.setCodBnf(this.getBeneficiarioBnf().getCodBnf());
132 	  comp_id.setCodIett(this.getItemEstruturaIett().getCodIett());
133   }
134 
135 }