155 lines
3.9 KiB
Java
155 lines
3.9 KiB
Java
/*
|
|
* To change this template, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
package com.rjconsultores.ventaboletos.entidad;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.List;
|
|
import javax.persistence.Basic;
|
|
import javax.persistence.CascadeType;
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.JoinColumn;
|
|
import javax.persistence.ManyToOne;
|
|
import javax.persistence.NamedQueries;
|
|
import javax.persistence.NamedQuery;
|
|
import javax.persistence.OneToMany;
|
|
import javax.persistence.Table;
|
|
|
|
/**
|
|
*
|
|
* @author Rafael
|
|
*/
|
|
@Entity
|
|
@Table(name = "PTOVTA_COMPOSICAO")
|
|
@NamedQueries({
|
|
@NamedQuery(name = "PtovtaComposicao.findAll", query = "SELECT p FROM PtovtaComposicao p")})
|
|
public class PtovtaComposicao implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@Basic(optional = false)
|
|
@Column(name = "ID")
|
|
private Integer id;
|
|
@Basic(optional = false)
|
|
@Column(name = "DESCRICAO")
|
|
private String descricao;
|
|
@Basic(optional = false)
|
|
@Column(name = "TIPOCOMPOSICAO")
|
|
private String tipocomposicao;
|
|
@Basic(optional = false)
|
|
@Column(name = "ACTIVO")
|
|
private short activo;
|
|
@Basic(optional = false)
|
|
@Column(name = "FECMODIF")
|
|
private int fecmodif;
|
|
@Basic(optional = false)
|
|
@Column(name = "USUARIO_ID")
|
|
private int usuarioId;
|
|
|
|
@JoinColumn(name = "COMISSAO_ID", referencedColumnName = "ID")
|
|
@ManyToOne
|
|
private PtovtaComissao comissaoId;
|
|
|
|
public PtovtaComposicao() {
|
|
}
|
|
|
|
public PtovtaComposicao(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public PtovtaComposicao(Integer id, String descricao, String tipocomposicao, short activo, int fecmodif, int usuarioId) {
|
|
this.id = id;
|
|
this.descricao = descricao;
|
|
this.tipocomposicao = tipocomposicao;
|
|
this.activo = activo;
|
|
this.fecmodif = fecmodif;
|
|
this.usuarioId = usuarioId;
|
|
}
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getDescricao() {
|
|
return descricao;
|
|
}
|
|
|
|
public void setDescricao(String descricao) {
|
|
this.descricao = descricao;
|
|
}
|
|
|
|
public String getTipocomposicao() {
|
|
return tipocomposicao;
|
|
}
|
|
|
|
public void setTipocomposicao(String tipocomposicao) {
|
|
this.tipocomposicao = tipocomposicao;
|
|
}
|
|
|
|
public short getActivo() {
|
|
return activo;
|
|
}
|
|
|
|
public void setActivo(short activo) {
|
|
this.activo = activo;
|
|
}
|
|
|
|
public int getFecmodif() {
|
|
return fecmodif;
|
|
}
|
|
|
|
public void setFecmodif(int fecmodif) {
|
|
this.fecmodif = fecmodif;
|
|
}
|
|
|
|
public int getUsuarioId() {
|
|
return usuarioId;
|
|
}
|
|
|
|
public void setUsuarioId(int usuarioId) {
|
|
this.usuarioId = usuarioId;
|
|
}
|
|
|
|
|
|
public PtovtaComissao getComissaoId() {
|
|
return comissaoId;
|
|
}
|
|
|
|
public void setComissaoId(PtovtaComissao comissaoId) {
|
|
this.comissaoId = comissaoId;
|
|
}
|
|
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int hash = 0;
|
|
hash += (id != null ? id.hashCode() : 0);
|
|
return hash;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object object) {
|
|
// TODO: Warning - this method won't work in the case the id fields are not set
|
|
if (!(object instanceof PtovtaComposicao)) {
|
|
return false;
|
|
}
|
|
PtovtaComposicao other = (PtovtaComposicao) object;
|
|
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "com.rjconsultores.ventaboletos.entidad.PtovtaComposicao[ id=" + id + " ]";
|
|
}
|
|
|
|
}
|