232 lines
5.7 KiB
Java
232 lines
5.7 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.Date;
|
|
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;
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.TemporalType;
|
|
|
|
/**
|
|
*
|
|
* @author Rafael
|
|
*/
|
|
@Entity
|
|
@Table(name = "PTOVTA_COMISSAO")
|
|
@NamedQueries({
|
|
@NamedQuery(name = "PtovtaComissao.findAll", query = "SELECT p FROM PtovtaComissao p")})
|
|
public class PtovtaComissao implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@Basic(optional = false)
|
|
@Column(name = "ID")
|
|
private Integer id;
|
|
|
|
@Column(name = "ISSRETIDO")
|
|
private int issretido;
|
|
|
|
@Column(name = "ROYALTIES")
|
|
private int royalties;
|
|
|
|
@Column(name = "ENVIARRECIBO")
|
|
private short enviarrecibo;
|
|
|
|
@Column(name = "RECEITA")
|
|
private String receita;
|
|
|
|
@Column(name = "CODAG")
|
|
private int codag;
|
|
|
|
|
|
|
|
@Column(name = "DESTINO_ID")
|
|
private int destinoId;
|
|
@Basic(optional = false)
|
|
@Column(name = "ACTIVO")
|
|
private Boolean activo;
|
|
|
|
@Column(name = "FECMODIF")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecmodif;
|
|
|
|
@Column(name = "USUARIO_ID")
|
|
private int usuarioId;
|
|
|
|
@OneToMany(mappedBy = "comissaoId")
|
|
private List<PtovtaComposicao> ptovtaComposicaoList;
|
|
@OneToMany(mappedBy = "comissaoId")
|
|
private List<PtovtaPercentual> ptovtaPercentualList;
|
|
|
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
|
@ManyToOne
|
|
private PuntoVenta puntoventaId;
|
|
|
|
public PtovtaComissao() {
|
|
}
|
|
|
|
public PtovtaComissao(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public PtovtaComissao(Integer id, int issretido, int royalties, short enviarrecibo, String receita, int codag, int destinoId, Boolean activo, Date fecmodif, int usuarioId) {
|
|
this.id = id;
|
|
this.issretido = issretido;
|
|
this.royalties = royalties;
|
|
this.enviarrecibo = enviarrecibo;
|
|
this.receita = receita;
|
|
this.codag = codag;
|
|
this.destinoId = destinoId;
|
|
this.activo = activo;
|
|
this.fecmodif = fecmodif;
|
|
this.usuarioId = usuarioId;
|
|
}
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public int getIssretido() {
|
|
return issretido;
|
|
}
|
|
|
|
public void setIssretido(int issretido) {
|
|
this.issretido = issretido;
|
|
}
|
|
|
|
public int getRoyalties() {
|
|
return royalties;
|
|
}
|
|
|
|
public void setRoyalties(int royalties) {
|
|
this.royalties = royalties;
|
|
}
|
|
|
|
public short getEnviarrecibo() {
|
|
return enviarrecibo;
|
|
}
|
|
|
|
public void setEnviarrecibo(short enviarrecibo) {
|
|
this.enviarrecibo = enviarrecibo;
|
|
}
|
|
|
|
public String getReceita() {
|
|
return receita;
|
|
}
|
|
|
|
public void setReceita(String receita) {
|
|
this.receita = receita;
|
|
}
|
|
|
|
public int getCodag() {
|
|
return codag;
|
|
}
|
|
|
|
public void setCodag(int codag) {
|
|
this.codag = codag;
|
|
}
|
|
|
|
public int getDestinoId() {
|
|
return destinoId;
|
|
}
|
|
|
|
public void setDestinoId(int destinoId) {
|
|
this.destinoId = destinoId;
|
|
}
|
|
|
|
public Boolean getActivo() {
|
|
return activo;
|
|
}
|
|
|
|
public void setActivo(Boolean activo) {
|
|
this.activo = activo;
|
|
}
|
|
|
|
public Date getFecmodif() {
|
|
return fecmodif;
|
|
}
|
|
|
|
public void setFecmodif(Date fecmodif) {
|
|
this.fecmodif = fecmodif;
|
|
}
|
|
|
|
public int getUsuarioId() {
|
|
return usuarioId;
|
|
}
|
|
|
|
public void setUsuarioId(int usuarioId) {
|
|
this.usuarioId = usuarioId;
|
|
}
|
|
|
|
|
|
|
|
public PuntoVenta getPuntoventaId() {
|
|
return puntoventaId;
|
|
}
|
|
|
|
public void setPuntoventaId(PuntoVenta puntoventaId) {
|
|
this.puntoventaId = puntoventaId;
|
|
}
|
|
|
|
|
|
public List<PtovtaComposicao> getPtovtaComposicaoList() {
|
|
return ptovtaComposicaoList;
|
|
}
|
|
|
|
public void setPtovtaComposicaoList(List<PtovtaComposicao> ptovtaComposicaoList) {
|
|
this.ptovtaComposicaoList = ptovtaComposicaoList;
|
|
}
|
|
|
|
|
|
public List<PtovtaPercentual> getPtovtaPercentualList() {
|
|
return ptovtaPercentualList;
|
|
}
|
|
|
|
public void setPtovtaPercentualList(List<PtovtaPercentual> ptovtaPercentualList) {
|
|
this.ptovtaPercentualList = ptovtaPercentualList;
|
|
}
|
|
|
|
@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 PtovtaComissao)) {
|
|
return false;
|
|
}
|
|
PtovtaComissao other = (PtovtaComissao) 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.PtovtaComissao[ id=" + id + " ]";
|
|
}
|
|
|
|
}
|