101 lines
2.7 KiB
Java
101 lines
2.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 javax.persistence.Basic;
|
|
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.Table;
|
|
|
|
/**
|
|
*
|
|
* @author Rafael
|
|
*/
|
|
@Entity
|
|
@Table(name = "PTOVTA_COMISSAO_PERCENTUAL")
|
|
@NamedQueries({
|
|
@NamedQuery(name = "PtovtaComissaoPercentual.findAll", query = "SELECT p FROM PtovtaComissaoPercentual p")})
|
|
public class PtovtaComissaoPercentual implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@Basic(optional = false)
|
|
@Column(name = "ID")
|
|
private Integer id;
|
|
@Basic(optional = false)
|
|
@Column(name = "COMISSAO_ID")
|
|
private int comissaoId;
|
|
@JoinColumn(name = "PERCENTUAL_ID", referencedColumnName = "ID")
|
|
@ManyToOne(optional = false)
|
|
private PtovtaPercentual percentualId;
|
|
|
|
public PtovtaComissaoPercentual() {
|
|
}
|
|
|
|
public PtovtaComissaoPercentual(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public PtovtaComissaoPercentual(Integer id, int comissaoId) {
|
|
this.id = id;
|
|
this.comissaoId = comissaoId;
|
|
}
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public int getComissaoId() {
|
|
return comissaoId;
|
|
}
|
|
|
|
public void setComissaoId(int comissaoId) {
|
|
this.comissaoId = comissaoId;
|
|
}
|
|
|
|
public PtovtaPercentual getPercentualId() {
|
|
return percentualId;
|
|
}
|
|
|
|
public void setPercentualId(PtovtaPercentual percentualId) {
|
|
this.percentualId = percentualId;
|
|
}
|
|
|
|
@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 PtovtaComissaoPercentual)) {
|
|
return false;
|
|
}
|
|
PtovtaComissaoPercentual other = (PtovtaComissaoPercentual) 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.PtovtaComissaoPercentual[ id=" + id + " ]";
|
|
}
|
|
|
|
}
|