293 lines
6.9 KiB
Java
293 lines
6.9 KiB
Java
package com.rjconsultores.ventaboletos.entidad;
|
|
|
|
/// Generated 26/10/2013 14:51:58 by Hibernate Tools 3.4.0.CR1
|
|
|
|
import java.util.Date;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.FetchType;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.JoinColumn;
|
|
import javax.persistence.ManyToOne;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.TemporalType;
|
|
|
|
import org.hibernate.annotations.GenericGenerator;
|
|
|
|
/**
|
|
* Aidf generated by hbm2java
|
|
*/
|
|
@Entity
|
|
@Table(name = "AIDF")
|
|
public class Aidf implements java.io.Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private Long aidfId;
|
|
private AidfTipo aidfTipo;
|
|
private AidfEspecie aidfEspecie;
|
|
private PuntoVenta puntoVenta;
|
|
private Estado estado;
|
|
private String docfiscal;
|
|
private String acfiscal;
|
|
private String serie;
|
|
private String subserie;
|
|
private String forminicial;
|
|
private String formfinal;
|
|
private Date fecadquisicion;
|
|
private Date fecvencimiento;
|
|
private String inscestadual;
|
|
private Empresa empresa;
|
|
private Boolean activo;
|
|
private Date fecmodif;
|
|
private Integer usuarioId;
|
|
private String cnpj;
|
|
private String tipoValidaVenta;
|
|
|
|
public Aidf() {
|
|
}
|
|
|
|
public Aidf(AidfTipo aidfTipo, PuntoVenta puntoVenta, AidfEspecie aidfEspecie, Estado estado, String docfiscal, String acfiscal,
|
|
String serie, String subserie, String forminicial, String formfinal, Date fecadquisicion, Date fecvencimiento,
|
|
String inscestadual, Empresa empresa, Boolean activo, Date fecmodif, Integer usuarioId) {
|
|
this.aidfTipo = aidfTipo;
|
|
this.puntoVenta = puntoVenta;
|
|
this.aidfEspecie = aidfEspecie;
|
|
this.estado = estado;
|
|
this.docfiscal = docfiscal;
|
|
this.acfiscal = acfiscal;
|
|
this.serie = serie;
|
|
this.subserie = subserie;
|
|
this.forminicial = forminicial;
|
|
this.formfinal = formfinal;
|
|
this.fecadquisicion = fecadquisicion;
|
|
this.fecvencimiento = fecvencimiento;
|
|
this.inscestadual = inscestadual;
|
|
this.empresa = empresa;
|
|
this.activo = activo;
|
|
this.fecmodif = fecmodif;
|
|
this.usuarioId = usuarioId;
|
|
|
|
}
|
|
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
@JoinColumn(name = "PUNTOVENTA_ID")
|
|
public PuntoVenta getPuntoVenta() {
|
|
return puntoVenta;
|
|
}
|
|
|
|
public void setPuntoVenta(PuntoVenta puntoVenta) {
|
|
this.puntoVenta = puntoVenta;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int hash = 0;
|
|
hash += (aidfId != null ? aidfId.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 Aidf))
|
|
return false;
|
|
|
|
Aidf other = (Aidf) object;
|
|
if ((this.aidfId == null && other.aidfId != null) || (this.aidfId != null && !this.aidfId.equals(other.aidfId))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Id
|
|
@GenericGenerator(name = "aidfgen_id", strategy = "com.rjconsultores.ventaboletos.dao.util.AidfGenerator")
|
|
@GeneratedValue(generator = "aidfgen_id")
|
|
@Column(name = "AIDF_ID", unique = true, nullable = false, precision = 15, scale = 0)
|
|
public Long getAidfId() {
|
|
return aidfId;
|
|
}
|
|
|
|
public void setAidfId(Long aidfId) {
|
|
this.aidfId = aidfId;
|
|
}
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "AIDFTIPO_ID")
|
|
public AidfTipo getAidfTipo() {
|
|
return aidfTipo;
|
|
}
|
|
|
|
public void setAidfTipo(AidfTipo aidfTipo) {
|
|
this.aidfTipo = aidfTipo;
|
|
}
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "AIDFESP_ID")
|
|
public AidfEspecie getAidfEspecie() {
|
|
return aidfEspecie;
|
|
}
|
|
|
|
public void setAidfEspecie(AidfEspecie aidfEspecie) {
|
|
this.aidfEspecie = aidfEspecie;
|
|
}
|
|
|
|
@JoinColumn(name = "ESTADO_ID")
|
|
@ManyToOne
|
|
public Estado getEstado() {
|
|
return estado;
|
|
}
|
|
|
|
public void setEstado(Estado estado) {
|
|
this.estado = estado;
|
|
}
|
|
|
|
@Column(name = "DOCFISCAL", length = 20)
|
|
public String getDocfiscal() {
|
|
return docfiscal;
|
|
}
|
|
|
|
public void setDocfiscal(String docfiscal) {
|
|
this.docfiscal = docfiscal;
|
|
}
|
|
|
|
@Column(name = "ACFISCAL", length = 20)
|
|
public String getAcfiscal() {
|
|
return acfiscal;
|
|
}
|
|
|
|
public void setAcfiscal(String acfiscal) {
|
|
this.acfiscal = acfiscal;
|
|
}
|
|
|
|
@Column(name = "SERIE", length = 20)
|
|
public String getSerie() {
|
|
return serie;
|
|
}
|
|
|
|
public void setSerie(String serie) {
|
|
this.serie = serie;
|
|
}
|
|
|
|
@Column(name = "SUBSERIE", length = 20)
|
|
public String getSubserie() {
|
|
return subserie;
|
|
}
|
|
|
|
public void setSubserie(String subserie) {
|
|
this.subserie = subserie;
|
|
}
|
|
|
|
@Column(name = "FORMINICIAL", length = 12)
|
|
public String getForminicial() {
|
|
return forminicial;
|
|
}
|
|
|
|
public void setForminicial(String forminicial) {
|
|
this.forminicial = forminicial;
|
|
}
|
|
|
|
@Column(name = "FORMFINAL", length = 12)
|
|
public String getFormfinal() {
|
|
return formfinal;
|
|
}
|
|
|
|
public void setFormfinal(String formfinal) {
|
|
this.formfinal = formfinal;
|
|
}
|
|
|
|
@Temporal(TemporalType.DATE)
|
|
@Column(name = "FECADQUISICION", length = 7)
|
|
public Date getFecadquisicion() {
|
|
return fecadquisicion;
|
|
}
|
|
|
|
public void setFecadquisicion(Date fecadquisicion) {
|
|
this.fecadquisicion = fecadquisicion;
|
|
}
|
|
|
|
@Column(name = "CNPJ", length = 20)
|
|
public String getCnpj() {
|
|
return cnpj;
|
|
}
|
|
|
|
public void setCnpj(String cnpj) {
|
|
this.cnpj = cnpj;
|
|
}
|
|
|
|
@Temporal(TemporalType.DATE)
|
|
@Column(name = "FECVENCIMIENTO", length = 7)
|
|
public Date getFecvencimiento() {
|
|
return fecvencimiento;
|
|
}
|
|
|
|
public void setFecvencimiento(Date fecvencimiento) {
|
|
this.fecvencimiento = fecvencimiento;
|
|
}
|
|
|
|
@Column(name = "INSCESTADUAL", length = 20)
|
|
public String getInscestadual() {
|
|
return inscestadual;
|
|
}
|
|
|
|
public void setInscestadual(String inscestadual) {
|
|
this.inscestadual = inscestadual;
|
|
}
|
|
|
|
@JoinColumn(name = "EMPRESA_ID")
|
|
@ManyToOne
|
|
public Empresa getEmpresa() {
|
|
return empresa;
|
|
}
|
|
|
|
public void setEmpresa(Empresa empresa) {
|
|
this.empresa = empresa;
|
|
}
|
|
|
|
@Column(name = "ACTIVO", precision = 1, scale = 0)
|
|
public Boolean getActivo() {
|
|
return activo;
|
|
}
|
|
|
|
public void setActivo(Boolean activo) {
|
|
this.activo = activo;
|
|
}
|
|
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
@Column(name = "FECMODIF", length = 7)
|
|
public Date getFecmodif() {
|
|
return fecmodif;
|
|
}
|
|
|
|
public void setFecmodif(Date fecmodif) {
|
|
this.fecmodif = fecmodif;
|
|
}
|
|
|
|
@Column(name = "USUARIO_ID", precision = 7, scale = 0)
|
|
public Integer getUsuarioId() {
|
|
return usuarioId;
|
|
}
|
|
|
|
public void setUsuarioId(Integer usuarioId) {
|
|
this.usuarioId = usuarioId;
|
|
}
|
|
|
|
@Column(name = "TIPOVALIDAVENTA")
|
|
public String getTipoValidaVenta() {
|
|
return tipoValidaVenta;
|
|
}
|
|
|
|
public void setTipoValidaVenta(String tipoValidaVenta) {
|
|
this.tipoValidaVenta = tipoValidaVenta;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.format("%s - %s", this.getAidfId(), (this.getSerie() == null ? "" : this.getSerie()
|
|
+ this.getSubserie() == null ? "" : this.getSubserie()));
|
|
}
|
|
|
|
} |