165 lines
4.1 KiB
Java
165 lines
4.1 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.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.SequenceGenerator;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.TemporalType;
|
|
import javax.xml.bind.annotation.XmlRootElement;
|
|
|
|
/**
|
|
*
|
|
* @author gleimar
|
|
*/
|
|
@Entity
|
|
@Table(name = "CONEXION")
|
|
public class Conexion implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@Basic(optional = false)
|
|
@Column(name = "CONEXION_ID")
|
|
private Long conexionId;
|
|
@Column(name = "NUMGRUPO")
|
|
private Integer numgrupo;
|
|
@Column(name = "NUMSECUENCIA")
|
|
private Short numsecuencia;
|
|
@Column(name = "ACTIVO")
|
|
private Boolean activo;
|
|
@Column(name = "FECMODIF")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecmodif;
|
|
@Column(name = "USUARIO_ID")
|
|
private Integer usuarioId;
|
|
@Column(name = "ORIGEN_ID")
|
|
private Integer origenId;
|
|
@Column(name = "DESTINO_ID")
|
|
private Integer destinoId;
|
|
@Column(name = "CONEXIONCTRL_ID")
|
|
private Long conexionctrlId;
|
|
@JoinColumn(name = "ORIGEN_ID", referencedColumnName = "PARADA_ID",insertable=false,updatable=false)
|
|
@ManyToOne
|
|
private Parada origen;
|
|
@JoinColumn(name = "DESTINO_ID", referencedColumnName = "PARADA_ID",insertable=false,updatable=false)
|
|
@ManyToOne
|
|
private Parada destino;
|
|
|
|
public Conexion() {
|
|
}
|
|
|
|
public Conexion(Long conexionId) {
|
|
this.conexionId = conexionId;
|
|
}
|
|
|
|
public Long getConexionId() {
|
|
return conexionId;
|
|
}
|
|
|
|
public void setConexionId(Long conexionId) {
|
|
this.conexionId = conexionId;
|
|
}
|
|
|
|
public Integer getNumgrupo() {
|
|
return numgrupo;
|
|
}
|
|
|
|
public void setNumgrupo(Integer numgrupo) {
|
|
this.numgrupo = numgrupo;
|
|
}
|
|
|
|
public Short getNumsecuencia() {
|
|
return numsecuencia;
|
|
}
|
|
|
|
public void setNumsecuencia(Short numsecuencia) {
|
|
this.numsecuencia = numsecuencia;
|
|
}
|
|
|
|
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 int hashCode() {
|
|
int hash = 0;
|
|
hash += (conexionId != null ? conexionId.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 Conexion)) {
|
|
return false;
|
|
}
|
|
Conexion other = (Conexion) object;
|
|
if ((this.conexionId == null && other.conexionId != null) || (this.conexionId != null && !this.conexionId.equals(other.conexionId))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "com.rjconsultores.entidad.Conexion[ conexionId=" + conexionId + " ]";
|
|
}
|
|
|
|
public Long getConexionctrlId() {
|
|
return conexionctrlId;
|
|
}
|
|
|
|
public void setConexionctrlId(Long conexionctrlId) {
|
|
this.conexionctrlId = conexionctrlId;
|
|
}
|
|
|
|
public Integer getOrigenId() {
|
|
return origenId;
|
|
}
|
|
|
|
public void setOrigenId(Integer origenId) {
|
|
this.origenId = origenId;
|
|
}
|
|
|
|
public Integer getDestinoId() {
|
|
return destinoId;
|
|
}
|
|
|
|
public void setDestinoId(Integer destinoId) {
|
|
this.destinoId = destinoId;
|
|
}
|
|
|
|
}
|