AdmMono/src/com/rjconsultores/ventaboletos/entidad/AutobusDoc.java

101 lines
3.0 KiB
Java

package com.rjconsultores.ventaboletos.entidad;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity
@SequenceGenerator(name = "AUTOBUS_DOC_SEQ", sequenceName = "AUTOBUS_DOC_SEQ", allocationSize = 1)
@Table(name = "AUTOBUS_DOC")
public class AutobusDoc {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "AUTOBUSDOC_ID")
@GeneratedValue(strategy = GenerationType.AUTO, generator = "AUTOBUS_DOC_SEQ")
private Integer autobusDocId;
@ManyToOne
@JoinColumn(name = "AUTOBUS_ID", referencedColumnName = "AUTOBUS_ID")
private Autobus autobus;
@JoinColumn(name = "TIPODOCAUTOBUS_ID", referencedColumnName = "TIPODOCAUTOBUS_ID")
@ManyToOne
private TipoDocAutobus tipoDocAutobus;
@Column(name = "FECHACADUCIDAD")
private Date fechaCaducidad;
@Column(name = "ACTIVO")
private Boolean activo;
@Column(name = "FECMODIF")
@Temporal(TemporalType.TIMESTAMP)
private Date fecmodif;
@Column(name = "USUARIO_ID")
private Integer usuarioId;
public Integer getAutobusDocId() {
return autobusDocId;
}
public void setAutobusDocId(Integer autobusDocId) {
this.autobusDocId = autobusDocId;
}
public Autobus getAutobus() {
return autobus;
}
public void setAutobus(Autobus autobus) {
this.autobus = autobus;
}
public TipoDocAutobus getTipoDocAutobus() {
return tipoDocAutobus;
}
public void setTipoDocAutobus(TipoDocAutobus tipoDocAutobus) {
this.tipoDocAutobus = tipoDocAutobus;
}
public Date getFechaCaducidad() {
return fechaCaducidad;
}
public void setFechaCaducidad(Date fechaCaducidad) {
this.fechaCaducidad = fechaCaducidad;
}
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 Integer getUsuarioId() {
return usuarioId;
}
public void setUsuarioId(Integer usuarioId) {
this.usuarioId = usuarioId;
}
@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 AutobusDoc)) {
return false;
}
AutobusDoc other = (AutobusDoc) object;
if ((this.autobusDocId == null && other.autobusDocId != null) || (this.autobusDocId != null && !this.autobusDocId.equals(other.autobusDocId))) {
return false;
}
return true;
}
}