1 package ecar.pojo;
2
3
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
16
17
18
19 @Entity
20 @Table(name = "TB_ITEM_EST_USUTPFUAC_IETTUTFA")
21 public class ItemEstUsutpfuacIettutfa implements java.io.Serializable, PaiFilho {
22
23 private static final long serialVersionUID = -7646624743517789152L;
24
25 private ItemEstUsutpfuacIettutfaPK comp_id;
26 private Boolean indExclusaoPosHistorico;
27 private Date dataUltManutencao;
28 private ItemEstruturaIett itemEstruturaIett;
29 private TipoFuncAcompTpfa tipoFuncAcompTpfa;
30 private UsuarioUsu usuarioUsu;
31 private SisAtributoSatb sisAtributoSatb;
32 private UsuarioUsu usuManutencao;
33
34 public ItemEstUsutpfuacIettutfa() {
35 }
36
37 public ItemEstUsutpfuacIettutfa(ItemEstUsutpfuacIettutfaPK comp_id) {
38 this.comp_id = comp_id;
39 }
40
41 public ItemEstUsutpfuacIettutfa(ItemEstUsutpfuacIettutfaPK comp_id, Boolean indExclusaoPosHistorico, Date dataUltManutencao, ItemEstruturaIett itemEstruturaIett, TipoFuncAcompTpfa tipoFuncAcompTpfa, UsuarioUsu usuarioUsu, SisAtributoSatb sisAtributoSatb, UsuarioUsu usuManutencao) {
42 this.comp_id = comp_id;
43 this.indExclusaoPosHistorico = indExclusaoPosHistorico;
44 this.dataUltManutencao = dataUltManutencao;
45 this.itemEstruturaIett = itemEstruturaIett;
46 this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
47 this.usuarioUsu = usuarioUsu;
48 this.sisAtributoSatb = sisAtributoSatb;
49 this.usuManutencao = usuManutencao;
50 }
51
52 @EmbeddedId
53 @AttributeOverrides( { @AttributeOverride(name = "codTpfa", column = @Column(name = "COD_TPFA", nullable = false, length = 10)), @AttributeOverride(name = "codIett", column = @Column(name = "COD_IETT", nullable = false, length = 10)) })
54 public ItemEstUsutpfuacIettutfaPK getComp_id() {
55 return this.comp_id;
56 }
57
58 public void setComp_id(ItemEstUsutpfuacIettutfaPK comp_id) {
59 this.comp_id = comp_id;
60 }
61
62 @Column(name = "IND_EXCLUSAO_POS_HISTORICO")
63 public Boolean getIndExclusaoPosHistorico() {
64 return this.indExclusaoPosHistorico;
65 }
66
67 public void setIndExclusaoPosHistorico(Boolean indExclusaoPosHistorico) {
68 this.indExclusaoPosHistorico = indExclusaoPosHistorico;
69 }
70
71 @Column(name = "data_ult_manutencao")
72 public Date getDataUltManutencao() {
73 return this.dataUltManutencao;
74 }
75
76 public void setDataUltManutencao(Date dataUltManutencao) {
77 this.dataUltManutencao = dataUltManutencao;
78 }
79
80 @ManyToOne(fetch = FetchType.LAZY)
81 @JoinColumn(name = "COD_IETT", insertable = false, updatable = false)
82 public ItemEstruturaIett getItemEstruturaIett() {
83 return this.itemEstruturaIett;
84 }
85
86 public void setItemEstruturaIett(ItemEstruturaIett itemEstruturaIett) {
87 this.itemEstruturaIett = itemEstruturaIett;
88 }
89
90 @ManyToOne(fetch = FetchType.LAZY)
91 @JoinColumn(name = "COD_TPFA", insertable = false, updatable = false)
92 public TipoFuncAcompTpfa getTipoFuncAcompTpfa() {
93 return this.tipoFuncAcompTpfa;
94 }
95
96 public void setTipoFuncAcompTpfa(TipoFuncAcompTpfa tipoFuncAcompTpfa) {
97 this.tipoFuncAcompTpfa = tipoFuncAcompTpfa;
98 }
99
100 @ManyToOne(fetch = FetchType.LAZY)
101 @JoinColumn(name = "COD_USU")
102 public UsuarioUsu getUsuarioUsu() {
103 return this.usuarioUsu;
104 }
105
106 public void setUsuarioUsu(UsuarioUsu usuarioUsu) {
107 this.usuarioUsu = usuarioUsu;
108 }
109
110 @ManyToOne(fetch = FetchType.LAZY)
111 @JoinColumn(name = "COD_SATB")
112 public SisAtributoSatb getSisAtributoSatb() {
113 return this.sisAtributoSatb;
114 }
115
116 public void setSisAtributoSatb(SisAtributoSatb sisAtributoSatb) {
117 this.sisAtributoSatb = sisAtributoSatb;
118 }
119
120 @ManyToOne(fetch = FetchType.LAZY)
121 @JoinColumn(name = "COD_USU_MANUTENCAO")
122 public UsuarioUsu getUsuManutencao() {
123 return this.usuManutencao;
124 }
125
126 public void setUsuManutencao(UsuarioUsu usuManutencao) {
127 this.usuManutencao = usuManutencao;
128 }
129
130 public void atribuirPKPai() {
131 comp_id = new ItemEstUsutpfuacIettutfaPK();
132 comp_id.setCodIett(this.getItemEstruturaIett().getCodIett());
133 comp_id.setCodTpfa(this.getTipoFuncAcompTpfa().getCodTpfa());
134 }
135
136 }