git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@22363 d1611594-4594-4d17-8e1d-87c2c4800839
parent
28ab30a490
commit
3cdb00ffce
|
@ -8,6 +8,7 @@ import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
|
@ -18,13 +19,14 @@ import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
import javax.persistence.SequenceGenerator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
|
@ -32,166 +34,178 @@ import javax.persistence.SequenceGenerator;
|
||||||
@Table(name = "CANCELACION_CTRL")
|
@Table(name = "CANCELACION_CTRL")
|
||||||
public class CancelacionCtrl implements Serializable {
|
public class CancelacionCtrl implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CANCELACION_CTRL_SEQ")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CANCELACION_CTRL_SEQ")
|
||||||
@Column(name = "CANCELACIONCTRL_ID")
|
@Column(name = "CANCELACIONCTRL_ID")
|
||||||
private Integer cancelacionctrlId;
|
private Integer cancelacionctrlId;
|
||||||
@Column(name = "TIEMPOPREVSALIDA")
|
@Column(name = "TIEMPOPREVSALIDA")
|
||||||
@Temporal(TemporalType.TIME)
|
@Temporal(TemporalType.TIME)
|
||||||
private Date tiempoprevsalida;
|
private Date tiempoprevsalida;
|
||||||
@Column(name = "FECMODIF")
|
@Column(name = "FECMODIF")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date fecmodif;
|
private Date fecmodif;
|
||||||
@Column(name = "ACTIVO")
|
@Column(name = "ACTIVO")
|
||||||
private Boolean activo;
|
private Boolean activo;
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private PuntoVenta puntoVenta;
|
private PuntoVenta puntoVenta;
|
||||||
@JoinColumn(name = "ORIGEN_ID", referencedColumnName = "PARADA_ID")
|
@JoinColumn(name = "ORIGEN_ID", referencedColumnName = "PARADA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Parada paradaOrigem;
|
private Parada paradaOrigem;
|
||||||
@JoinColumn(name = "DESTINO_ID", referencedColumnName = "PARADA_ID")
|
@JoinColumn(name = "DESTINO_ID", referencedColumnName = "PARADA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Parada paradaDestino;
|
private Parada paradaDestino;
|
||||||
@JoinColumn(name = "MARCA_ID", referencedColumnName = "MARCA_ID")
|
@JoinColumn(name = "MARCA_ID", referencedColumnName = "MARCA_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Marca marca;
|
private Marca marca;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "MOTIVOCANCELACION_ID", referencedColumnName = "MOTIVOCANCELACION_ID")
|
@JoinColumn(name = "MOTIVOCANCELACION_ID", referencedColumnName = "MOTIVOCANCELACION_ID")
|
||||||
private MotivoCancelacion motivoCancelacion;
|
private MotivoCancelacion motivoCancelacion;
|
||||||
@OneToMany(mappedBy = "cancelacionCtrl", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "cancelacionCtrl", cascade = CascadeType.ALL)
|
||||||
private List<CancelacionCargo> cancelacionCargoList;
|
private List<CancelacionCargo> cancelacionCargoList;
|
||||||
|
@OneToOne(cascade = CascadeType.ALL)
|
||||||
|
@JoinColumn(name = "ORGAOCONCEDENTE_ID")
|
||||||
|
private OrgaoConcedente orgaoConcedente;
|
||||||
|
|
||||||
public CancelacionCtrl() {
|
public CancelacionCtrl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CancelacionCtrl(Integer cancelacionctrlId) {
|
public CancelacionCtrl(Integer cancelacionctrlId) {
|
||||||
this.cancelacionctrlId = cancelacionctrlId;
|
this.cancelacionctrlId = cancelacionctrlId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getCancelacionctrlId() {
|
public Integer getCancelacionctrlId() {
|
||||||
return cancelacionctrlId;
|
return cancelacionctrlId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCancelacionctrlId(Integer cancelacionctrlId) {
|
public void setCancelacionctrlId(Integer cancelacionctrlId) {
|
||||||
this.cancelacionctrlId = cancelacionctrlId;
|
this.cancelacionctrlId = cancelacionctrlId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getTiempoprevsalida() {
|
public Date getTiempoprevsalida() {
|
||||||
return tiempoprevsalida;
|
return tiempoprevsalida;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTiempoprevsalida(Date tiempoprevsalida) {
|
public void setTiempoprevsalida(Date tiempoprevsalida) {
|
||||||
this.tiempoprevsalida = tiempoprevsalida;
|
this.tiempoprevsalida = tiempoprevsalida;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getFecmodif() {
|
public Date getFecmodif() {
|
||||||
return fecmodif;
|
return fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFecmodif(Date fecmodif) {
|
public void setFecmodif(Date fecmodif) {
|
||||||
this.fecmodif = fecmodif;
|
this.fecmodif = fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getActivo() {
|
public Boolean getActivo() {
|
||||||
return activo;
|
return activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setActivo(Boolean activo) {
|
public void setActivo(Boolean activo) {
|
||||||
this.activo = activo;
|
this.activo = activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getUsuarioId() {
|
public Integer getUsuarioId() {
|
||||||
return usuarioId;
|
return usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsuarioId(Integer usuarioId) {
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PuntoVenta getPuntoVenta() {
|
public PuntoVenta getPuntoVenta() {
|
||||||
return puntoVenta;
|
return puntoVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPuntoVenta(PuntoVenta puntoVenta) {
|
public void setPuntoVenta(PuntoVenta puntoVenta) {
|
||||||
this.puntoVenta = puntoVenta;
|
this.puntoVenta = puntoVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Parada getParadaDestino() {
|
public Parada getParadaDestino() {
|
||||||
return paradaDestino;
|
return paradaDestino;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParadaDestino(Parada paradaDestino) {
|
public void setParadaDestino(Parada paradaDestino) {
|
||||||
this.paradaDestino = paradaDestino;
|
this.paradaDestino = paradaDestino;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Parada getParadaOrigem() {
|
public Parada getParadaOrigem() {
|
||||||
return paradaOrigem;
|
return paradaOrigem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParadaOrigem(Parada paradaOrigem) {
|
public void setParadaOrigem(Parada paradaOrigem) {
|
||||||
this.paradaOrigem = paradaOrigem;
|
this.paradaOrigem = paradaOrigem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Marca getMarca() {
|
public Marca getMarca() {
|
||||||
return marca;
|
return marca;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMarca(Marca marca) {
|
public void setMarca(Marca marca) {
|
||||||
this.marca = marca;
|
this.marca = marca;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MotivoCancelacion getMotivoCancelacion() {
|
public MotivoCancelacion getMotivoCancelacion() {
|
||||||
return motivoCancelacion;
|
return motivoCancelacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMotivoCancelacion(MotivoCancelacion motivoCancelacion) {
|
public void setMotivoCancelacion(MotivoCancelacion motivoCancelacion) {
|
||||||
this.motivoCancelacion = motivoCancelacion;
|
this.motivoCancelacion = motivoCancelacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<CancelacionCargo> getCancelacionCargoList() {
|
public List<CancelacionCargo> getCancelacionCargoList() {
|
||||||
List<CancelacionCargo> tmp = new ArrayList<CancelacionCargo>();
|
List<CancelacionCargo> tmp = new ArrayList<CancelacionCargo>();
|
||||||
if (cancelacionCargoList != null) {
|
if (cancelacionCargoList != null) {
|
||||||
for (CancelacionCargo cc : this.cancelacionCargoList) {
|
for (CancelacionCargo cc : this.cancelacionCargoList) {
|
||||||
if (cc.getActivo()) {
|
if (cc.getActivo()) {
|
||||||
tmp.add(cc);
|
tmp.add(cc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCancelacionCargoList(List<CancelacionCargo> cancelacionCargoList) {
|
public void setCancelacionCargoList(List<CancelacionCargo> cancelacionCargoList) {
|
||||||
this.cancelacionCargoList = cancelacionCargoList;
|
this.cancelacionCargoList = cancelacionCargoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public OrgaoConcedente getOrgaoConcedente() {
|
||||||
public int hashCode() {
|
return orgaoConcedente;
|
||||||
int hash = 0;
|
}
|
||||||
hash += (cancelacionctrlId != null ? cancelacionctrlId.hashCode() : 0);
|
|
||||||
return hash;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
public void setOrgaoConcedente(OrgaoConcedente orgaoConcedente) {
|
||||||
public boolean equals(Object object) {
|
this.orgaoConcedente = orgaoConcedente;
|
||||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
}
|
||||||
if (!(object instanceof CancelacionCtrl)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
CancelacionCtrl other = (CancelacionCtrl) object;
|
|
||||||
if ((this.cancelacionctrlId == null && other.cancelacionctrlId != null) || (this.cancelacionctrlId != null && !this.cancelacionctrlId.equals(other.cancelacionctrlId))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public int hashCode() {
|
||||||
return "com.rjconsultores.ventaboletos.entidad.CancelacionCtrl[cancelacionctrlId=" + cancelacionctrlId + "]";
|
int hash = 0;
|
||||||
}
|
hash += (cancelacionctrlId != null ? cancelacionctrlId.hashCode() : 0);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object object) {
|
||||||
|
// Warning - this method won't work in the case the id fields are
|
||||||
|
// not set
|
||||||
|
if (!(object instanceof CancelacionCtrl)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CancelacionCtrl other = (CancelacionCtrl) object;
|
||||||
|
if ((this.cancelacionctrlId == null && other.cancelacionctrlId != null) || (this.cancelacionctrlId != null && !this.cancelacionctrlId.equals(other.cancelacionctrlId))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "com.rjconsultores.ventaboletos.entidad.CancelacionCtrl[cancelacionctrlId=" + cancelacionctrlId + "]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue