185 lines
4.4 KiB
Java
185 lines
4.4 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 javax.persistence.Basic;
|
|
import javax.persistence.CascadeType;
|
|
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;
|
|
|
|
/**
|
|
*
|
|
* @author Rafius
|
|
*/
|
|
@Entity
|
|
@SequenceGenerator(name = "ESQUEMA_ASIENTO_SEQ", sequenceName = "ESQUEMA_ASIENTO_SEQ", allocationSize = 1)
|
|
@Table(name = "ESQUEMA_ASIENTO")
|
|
public class EsquemaAsiento implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@Basic(optional = false)
|
|
@Column(name = "ESQUEMAASIENTO_ID")
|
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ESQUEMA_ASIENTO_SEQ")
|
|
private Integer esquemaasientoId;
|
|
@Column(name = "NUMASIENTO")
|
|
private String numasiento;
|
|
@Column(name = "INDVENDIBLE")
|
|
private Boolean indvendible;
|
|
@Column(name = "TIEMPOLIBERACION")
|
|
private Integer tiempoLiberacion;
|
|
@Column(name = "ACTIVO")
|
|
private Boolean activo;
|
|
@Column(name = "FECMODIF")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecmodif;
|
|
@Column(name = "USUARIO_ID")
|
|
private Integer usuarioId;
|
|
@JoinColumn(name = "PARADA_ID", referencedColumnName = "PARADA_ID")
|
|
@ManyToOne
|
|
private Parada parada;
|
|
@JoinColumn(name = "ESQUEMACORRIDA_ID", referencedColumnName = "ESQUEMACORRIDA_ID")
|
|
@ManyToOne(cascade = CascadeType.MERGE)
|
|
private EsquemaCorrida esquemaCorrida;
|
|
@Column(name = "MOTIVOBLOQUEO")
|
|
private String motivobloqueo;
|
|
@OneToOne
|
|
@JoinColumn(name = "DESTINO_ID", referencedColumnName = "PARADA_ID")
|
|
private Parada destino;
|
|
|
|
public EsquemaAsiento() {
|
|
}
|
|
|
|
public EsquemaAsiento(Integer esquemaasientoId) {
|
|
this.esquemaasientoId = esquemaasientoId;
|
|
}
|
|
|
|
public Integer getEsquemaasientoId() {
|
|
return esquemaasientoId;
|
|
}
|
|
|
|
public void setEsquemaasientoId(Integer esquemaasientoId) {
|
|
this.esquemaasientoId = esquemaasientoId;
|
|
}
|
|
|
|
public String getNumasiento() {
|
|
return numasiento;
|
|
}
|
|
|
|
public void setNumasiento(String numasiento) {
|
|
this.numasiento = numasiento;
|
|
}
|
|
|
|
public Boolean getIndvendible() {
|
|
return indvendible;
|
|
}
|
|
|
|
public void setIndvendible(Boolean indvendible) {
|
|
this.indvendible = indvendible;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
public Parada getParada() {
|
|
return parada;
|
|
}
|
|
|
|
public void setParada(Parada parada) {
|
|
this.parada = parada;
|
|
}
|
|
|
|
public EsquemaCorrida getEsquemaCorrida() {
|
|
return esquemaCorrida;
|
|
}
|
|
|
|
public void setEsquemaCorrida(EsquemaCorrida esquemaCorrida) {
|
|
this.esquemaCorrida = esquemaCorrida;
|
|
}
|
|
|
|
public Parada getDestino() {
|
|
return destino;
|
|
}
|
|
|
|
public void setDestino(Parada destinoId) {
|
|
this.destino = destinoId;
|
|
}
|
|
|
|
public String getMotivobloqueo() {
|
|
return motivobloqueo;
|
|
}
|
|
|
|
public void setMotivobloqueo(String motivobloqueo) {
|
|
this.motivobloqueo = motivobloqueo;
|
|
}
|
|
|
|
public Integer getTiempoLiberacion() {
|
|
return tiempoLiberacion;
|
|
}
|
|
|
|
public void setTiempoLiberacion(Integer tiempoLiberacion) {
|
|
this.tiempoLiberacion = tiempoLiberacion;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int hash = 0;
|
|
hash += (esquemaasientoId != null ? esquemaasientoId.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 EsquemaAsiento)) {
|
|
return false;
|
|
}
|
|
EsquemaAsiento other = (EsquemaAsiento) object;
|
|
if ((this.esquemaasientoId == null && other.esquemaasientoId != null) || (this.esquemaasientoId != null && !this.esquemaasientoId.equals(other.esquemaasientoId))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "com.rjconsultores.ventaboletos.entidad.test.EsquemaAsiento[esquemaasientoId=" + esquemaasientoId + "]";
|
|
}
|
|
}
|