147 lines
3.8 KiB
Java
147 lines
3.8 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.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.JoinColumn;
|
|
import javax.persistence.OneToOne;
|
|
import javax.persistence.SequenceGenerator;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.TemporalType;
|
|
|
|
/**
|
|
*
|
|
* @author Administrador
|
|
*/
|
|
@Entity
|
|
@SequenceGenerator(name = "EXCEPCION_REDONDO_SEQ", sequenceName = "EXCEPCION_REDONDO_SEQ", allocationSize = 1)
|
|
@Table(name = "EXCEPCION_REDONDO")
|
|
public class ExcepcionRedondo implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "EXCEPCION_REDONDO_SEQ")
|
|
@Basic(optional = false)
|
|
@Column(name = "EXCEPCIONREDONDO_ID")
|
|
private Integer excepcionredondoId;
|
|
@Column(name = "INDTIPO")
|
|
private String indtipo;
|
|
@Basic(optional = false)
|
|
@Column(name = "ACTIVO")
|
|
private Boolean activo;
|
|
@Column(name = "FECMODIF")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecmodif;
|
|
@Column(name = "USUARIO_ID")
|
|
private Integer usuarioId;
|
|
@OneToOne
|
|
@JoinColumn(name = "ORIGEN_ID")
|
|
private Parada origem;
|
|
@OneToOne
|
|
@JoinColumn(name = "DESTINO_ID")
|
|
private Parada destino;
|
|
|
|
public ExcepcionRedondo() {
|
|
}
|
|
|
|
public ExcepcionRedondo(Integer excepcionredondoId) {
|
|
this.excepcionredondoId = excepcionredondoId;
|
|
}
|
|
|
|
public ExcepcionRedondo(Integer excepcionredondoId, Boolean activo) {
|
|
this.excepcionredondoId = excepcionredondoId;
|
|
this.activo = activo;
|
|
}
|
|
|
|
public Integer getExcepcionredondoId() {
|
|
return excepcionredondoId;
|
|
}
|
|
|
|
public void setExcepcionredondoId(Integer excepcionredondoId) {
|
|
this.excepcionredondoId = excepcionredondoId;
|
|
}
|
|
|
|
public String getIndtipo() {
|
|
return indtipo;
|
|
}
|
|
|
|
public void setIndtipo(String indtipo) {
|
|
this.indtipo = indtipo;
|
|
}
|
|
|
|
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 getDestino() {
|
|
return destino;
|
|
}
|
|
|
|
public void setDestino(Parada destino) {
|
|
this.destino = destino;
|
|
}
|
|
|
|
public Parada getOrigem() {
|
|
return origem;
|
|
}
|
|
|
|
public void setOrigem(Parada origem) {
|
|
this.origem = origem;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int hash = 0;
|
|
hash += (excepcionredondoId != null ? excepcionredondoId.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 ExcepcionRedondo)) {
|
|
return false;
|
|
}
|
|
ExcepcionRedondo other = (ExcepcionRedondo) object;
|
|
if ((this.excepcionredondoId == null && other.excepcionredondoId != null) || (this.excepcionredondoId != null && !this.excepcionredondoId.equals(other.excepcionredondoId))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "com.rjconsultores.ventaboletos.entidad.ExcepcionRedondo[excepcionredondoId=" + excepcionredondoId + "]";
|
|
}
|
|
}
|