/* * 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.ArrayList; import java.util.Date; import java.util.List; 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.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; /** * * @author gleimar */ @Entity @SequenceGenerator(name = "CONEXION_SEQ", sequenceName = "CONEXION_SEQ", allocationSize = 1) @Table(name = "CONEXION") public class Conexion implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic(optional = false) @GeneratedValue(strategy = GenerationType.AUTO, generator = "CONEXION_SEQ") @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; @Column(name = "CORRIDA_ID") private Long corridaId; @Transient private List conexionesDescuentos; @Column(name = "RUTA_ID") private Integer rutaId; @Column(name = "CONEXIONRUTATRAMOCTRL_ID") private Long conexionRutaTramoId; @Transient private Boolean indPricing; public Long getCorridaId() { return corridaId; } public void setCorridaId(Long corridaId) { this.corridaId = corridaId; } public Conexion() { this(null); } public Conexion(Long conexionId) { this.conexionId = conexionId; conexionesDescuentos = new ArrayList(); } 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) { if (!(object instanceof Conexion)) { return false; } Conexion other = (Conexion) object; if (this.conexionId == null && other.getConexionId() == null) { return this.numgrupo == other.getNumgrupo() && this.getOrigenId() == other.getOrigenId() && this.getNumsecuencia() == other.getNumsecuencia() && this.getDestinoId() == other.destinoId; } return conexionId == other.getConexionId(); } @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; } public List getConexionesDescuentos() { return conexionesDescuentos; } public void setConexionesDescuentos(List conexionesDescuentos) { this.conexionesDescuentos = conexionesDescuentos; } public Integer getRutaId() { return rutaId; } public void setRutaId(Integer rutaId) { this.rutaId = rutaId; } public Long getConexionRutaTramoId() { return conexionRutaTramoId; } public void setConexionRutaTramoId(Long conexionRutaTramoId) { this.conexionRutaTramoId = conexionRutaTramoId; } public Boolean getIndPricing() { return indPricing == null ? false : indPricing; } public void setIndPricing(Boolean indPricing) { this.indPricing = indPricing; } }