git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@20549 d1611594-4594-4d17-8e1d-87c2c4800839
parent
e2100a92e0
commit
52d8766c68
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
@ -26,6 +27,7 @@ public class OrgaoConcedenteHibernateDAO extends GenericHibernateDAO<OrgaoConced
|
|||
public List<OrgaoConcedente> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.addOrder(Order.asc("descOrgao"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
|
|
@ -86,6 +86,11 @@ public class CoeficienteTarifa implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return descCoeficiente + " - " + coeficiente;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
|
|
@ -95,6 +95,11 @@ public class OrgaoConcedente implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return descOrgao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
|
|
@ -34,237 +34,252 @@ import javax.persistence.SequenceGenerator;
|
|||
@Table(name = "TRAMO")
|
||||
public class Tramo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "TRAMO_SEQ")
|
||||
@Column(name = "TRAMO_ID")
|
||||
private Integer tramoId;
|
||||
@Column(name = "DESCTRAMO")
|
||||
private String desctramo;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@JoinColumn(name = "VIA_ID", referencedColumnName = "VIA_ID")
|
||||
@ManyToOne
|
||||
private Via via;
|
||||
@JoinColumn(name = "ORIGEN_ID", referencedColumnName = "PARADA_ID")
|
||||
@ManyToOne
|
||||
private Parada origem;
|
||||
@JoinColumn(name = "DESTINO_ID", referencedColumnName = "PARADA_ID")
|
||||
@ManyToOne
|
||||
private Parada destino;
|
||||
@OneToMany(mappedBy = "tramo")
|
||||
private List<RutaSecuencia> rutaSecuenciaList;
|
||||
@OneToMany(mappedBy = "tramo")
|
||||
private List<RutaCombinacion> rutaCombinacionList;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
||||
private List<TramoTiempo> lsTramoTiempo;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
||||
private List<TramoServicio> tramoServicioList;
|
||||
@Column(name = "CANTKMPAGOCONDUCTOR")
|
||||
private BigDecimal kmPagoConductor;
|
||||
@Column(name = "CANTKMREAL")
|
||||
private BigDecimal kmReal;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
||||
private List<TramoKm> tramoKms;
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "TRAMO_SEQ")
|
||||
@Column(name = "TRAMO_ID")
|
||||
private Integer tramoId;
|
||||
@Column(name = "DESCTRAMO")
|
||||
private String desctramo;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@JoinColumn(name = "VIA_ID", referencedColumnName = "VIA_ID")
|
||||
@ManyToOne
|
||||
private Via via;
|
||||
@JoinColumn(name = "ORIGEN_ID", referencedColumnName = "PARADA_ID")
|
||||
@ManyToOne
|
||||
private Parada origem;
|
||||
@JoinColumn(name = "DESTINO_ID", referencedColumnName = "PARADA_ID")
|
||||
@ManyToOne
|
||||
private Parada destino;
|
||||
@OneToMany(mappedBy = "tramo")
|
||||
private List<RutaSecuencia> rutaSecuenciaList;
|
||||
@OneToMany(mappedBy = "tramo")
|
||||
private List<RutaCombinacion> rutaCombinacionList;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
||||
private List<TramoTiempo> lsTramoTiempo;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
||||
private List<TramoServicio> tramoServicioList;
|
||||
@Column(name = "CANTKMPAGOCONDUCTOR")
|
||||
private BigDecimal kmPagoConductor;
|
||||
@Column(name = "CANTKMREAL")
|
||||
private BigDecimal kmReal;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
||||
private List<TramoKm> tramoKms;
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "TRAMO_ID", referencedColumnName = "TRAMO_ID")
|
||||
private List<OrgaoTramo> lsOrgaoTramo;
|
||||
|
||||
public Tramo() {
|
||||
}
|
||||
public Tramo() {
|
||||
}
|
||||
|
||||
public Tramo(Integer tramoId) {
|
||||
this.tramoId = tramoId;
|
||||
}
|
||||
public Tramo(Integer tramoId) {
|
||||
this.tramoId = tramoId;
|
||||
}
|
||||
|
||||
public Integer getTramoId() {
|
||||
return tramoId;
|
||||
}
|
||||
public Integer getTramoId() {
|
||||
return tramoId;
|
||||
}
|
||||
|
||||
public void setTramoId(Integer tramoId) {
|
||||
this.tramoId = tramoId;
|
||||
}
|
||||
public void setTramoId(Integer tramoId) {
|
||||
this.tramoId = tramoId;
|
||||
}
|
||||
|
||||
public String getDesctramo() {
|
||||
return desctramo;
|
||||
}
|
||||
public String getDesctramo() {
|
||||
return desctramo;
|
||||
}
|
||||
|
||||
public void setDesctramo(String desctramo) {
|
||||
this.desctramo = desctramo;
|
||||
}
|
||||
public void setDesctramo(String desctramo) {
|
||||
this.desctramo = desctramo;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public Via getVia() {
|
||||
return via;
|
||||
}
|
||||
public Via getVia() {
|
||||
return via;
|
||||
}
|
||||
|
||||
public void setVia(Via via) {
|
||||
this.via = via;
|
||||
}
|
||||
public void setVia(Via via) {
|
||||
this.via = via;
|
||||
}
|
||||
|
||||
public Parada getDestino() {
|
||||
return destino;
|
||||
}
|
||||
public Parada getDestino() {
|
||||
return destino;
|
||||
}
|
||||
|
||||
public void setDestino(Parada destino) {
|
||||
this.destino = destino;
|
||||
}
|
||||
public void setDestino(Parada destino) {
|
||||
this.destino = destino;
|
||||
}
|
||||
|
||||
public Parada getOrigem() {
|
||||
return origem;
|
||||
}
|
||||
public Parada getOrigem() {
|
||||
return origem;
|
||||
}
|
||||
|
||||
public void setOrigem(Parada origem) {
|
||||
this.origem = origem;
|
||||
}
|
||||
public void setOrigem(Parada origem) {
|
||||
this.origem = origem;
|
||||
}
|
||||
|
||||
public List<RutaSecuencia> getRutaSecuenciaList() {
|
||||
List<RutaSecuencia> lsRutaSecuencia = new ArrayList<RutaSecuencia>();
|
||||
for (RutaSecuencia rSecuencia : this.rutaSecuenciaList) {
|
||||
if (rSecuencia.getActivo()) {
|
||||
lsRutaSecuencia.add(rSecuencia);
|
||||
}
|
||||
}
|
||||
public List<RutaSecuencia> getRutaSecuenciaList() {
|
||||
List<RutaSecuencia> lsRutaSecuencia = new ArrayList<RutaSecuencia>();
|
||||
for (RutaSecuencia rSecuencia : this.rutaSecuenciaList) {
|
||||
if (rSecuencia.getActivo()) {
|
||||
lsRutaSecuencia.add(rSecuencia);
|
||||
}
|
||||
}
|
||||
|
||||
this.rutaSecuenciaList = lsRutaSecuencia;
|
||||
this.rutaSecuenciaList = lsRutaSecuencia;
|
||||
|
||||
return lsRutaSecuencia;
|
||||
}
|
||||
return lsRutaSecuencia;
|
||||
}
|
||||
|
||||
public void setRutaSecuenciaList(List<RutaSecuencia> rutaSecuenciaList) {
|
||||
this.rutaSecuenciaList = rutaSecuenciaList;
|
||||
}
|
||||
public void setRutaSecuenciaList(List<RutaSecuencia> rutaSecuenciaList) {
|
||||
this.rutaSecuenciaList = rutaSecuenciaList;
|
||||
}
|
||||
|
||||
public List<RutaCombinacion> getRutaCombinacionList() {
|
||||
List<RutaCombinacion> lsRutaCombinacion = new ArrayList<RutaCombinacion>();
|
||||
for (RutaCombinacion rCombinacion : this.rutaCombinacionList) {
|
||||
if (rCombinacion.getActivo()) {
|
||||
lsRutaCombinacion.add(rCombinacion);
|
||||
}
|
||||
}
|
||||
public List<RutaCombinacion> getRutaCombinacionList() {
|
||||
List<RutaCombinacion> lsRutaCombinacion = new ArrayList<RutaCombinacion>();
|
||||
for (RutaCombinacion rCombinacion : this.rutaCombinacionList) {
|
||||
if (rCombinacion.getActivo()) {
|
||||
lsRutaCombinacion.add(rCombinacion);
|
||||
}
|
||||
}
|
||||
|
||||
this.rutaCombinacionList = lsRutaCombinacion;
|
||||
this.rutaCombinacionList = lsRutaCombinacion;
|
||||
|
||||
return lsRutaCombinacion;
|
||||
}
|
||||
return lsRutaCombinacion;
|
||||
}
|
||||
|
||||
public void setRutaCombinacionList(List<RutaCombinacion> rutaCombinacionList) {
|
||||
this.rutaCombinacionList = rutaCombinacionList;
|
||||
}
|
||||
public void setRutaCombinacionList(List<RutaCombinacion> rutaCombinacionList) {
|
||||
this.rutaCombinacionList = rutaCombinacionList;
|
||||
}
|
||||
|
||||
public List<TramoServicio> getTramoServicioList() {
|
||||
List<TramoServicio> lsTramoServicio = new ArrayList<TramoServicio>();
|
||||
for (TramoServicio tramoServicio : this.tramoServicioList) {
|
||||
if (tramoServicio.getActivo()) {
|
||||
lsTramoServicio.add(tramoServicio);
|
||||
}
|
||||
}
|
||||
public List<TramoServicio> getTramoServicioList() {
|
||||
List<TramoServicio> lsTramoServicio = new ArrayList<TramoServicio>();
|
||||
for (TramoServicio tramoServicio : this.tramoServicioList) {
|
||||
if (tramoServicio.getActivo()) {
|
||||
lsTramoServicio.add(tramoServicio);
|
||||
}
|
||||
}
|
||||
|
||||
this.tramoServicioList = lsTramoServicio;
|
||||
this.tramoServicioList = lsTramoServicio;
|
||||
|
||||
return lsTramoServicio;
|
||||
}
|
||||
return lsTramoServicio;
|
||||
}
|
||||
|
||||
public void setTramoServicioList(List<TramoServicio> tramoServicioList) {
|
||||
this.tramoServicioList = tramoServicioList;
|
||||
}
|
||||
public void setTramoServicioList(List<TramoServicio> tramoServicioList) {
|
||||
this.tramoServicioList = tramoServicioList;
|
||||
}
|
||||
|
||||
public List<TramoTiempo> getLsTramoTiempo() {
|
||||
List<TramoTiempo> lsTmp = new ArrayList<TramoTiempo>();
|
||||
for (TramoTiempo tramoAtributo : this.lsTramoTiempo) {
|
||||
if (tramoAtributo.getActivo()) {
|
||||
lsTmp.add(tramoAtributo);
|
||||
}
|
||||
}
|
||||
public List<TramoTiempo> getLsTramoTiempo() {
|
||||
List<TramoTiempo> lsTmp = new ArrayList<TramoTiempo>();
|
||||
for (TramoTiempo tramoAtributo : this.lsTramoTiempo) {
|
||||
if (tramoAtributo.getActivo()) {
|
||||
lsTmp.add(tramoAtributo);
|
||||
}
|
||||
}
|
||||
|
||||
this.lsTramoTiempo = lsTmp;
|
||||
this.lsTramoTiempo = lsTmp;
|
||||
|
||||
return lsTmp;
|
||||
}
|
||||
return lsTmp;
|
||||
}
|
||||
|
||||
public void setLsTramoTiempo(List<TramoTiempo> lsTramoTiempo) {
|
||||
this.lsTramoTiempo = lsTramoTiempo;
|
||||
}
|
||||
public void setLsTramoTiempo(List<TramoTiempo> lsTramoTiempo) {
|
||||
this.lsTramoTiempo = lsTramoTiempo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (tramoId != null ? tramoId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (tramoId != null ? tramoId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
public BigDecimal getKmPagoConductor() {
|
||||
return kmPagoConductor;
|
||||
}
|
||||
public BigDecimal getKmPagoConductor() {
|
||||
return kmPagoConductor;
|
||||
}
|
||||
|
||||
public void setKmPagoConductor(BigDecimal kmPagoConductor) {
|
||||
this.kmPagoConductor = kmPagoConductor;
|
||||
}
|
||||
public void setKmPagoConductor(BigDecimal kmPagoConductor) {
|
||||
this.kmPagoConductor = kmPagoConductor;
|
||||
}
|
||||
|
||||
public BigDecimal getKmReal() {
|
||||
return kmReal;
|
||||
}
|
||||
public BigDecimal getKmReal() {
|
||||
return kmReal;
|
||||
}
|
||||
|
||||
public void setKmReal(BigDecimal kmReal) {
|
||||
this.kmReal = kmReal;
|
||||
}
|
||||
public void setKmReal(BigDecimal kmReal) {
|
||||
this.kmReal = kmReal;
|
||||
}
|
||||
|
||||
@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 Tramo)) {
|
||||
return false;
|
||||
}
|
||||
Tramo other = (Tramo) object;
|
||||
if ((this.tramoId == null && other.tramoId != null) || (this.tramoId != null && !this.tramoId.equals(other.tramoId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public List<OrgaoTramo> getLsOrgaoTramo() {
|
||||
List<OrgaoTramo> tmp = new ArrayList<OrgaoTramo>();
|
||||
for (OrgaoTramo orgaoTramo : this.lsOrgaoTramo) {
|
||||
if (orgaoTramo.getActivo()) {
|
||||
tmp.add(orgaoTramo);
|
||||
}
|
||||
}
|
||||
|
||||
public List<TramoKm> getTramoKms() {
|
||||
return tramoKms;
|
||||
}
|
||||
this.lsOrgaoTramo = tmp;
|
||||
|
||||
public void setTramoKms(List<TramoKm> tramoKms) {
|
||||
this.tramoKms = tramoKms;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return getDesctramo();
|
||||
// }
|
||||
@Override
|
||||
public String toString() {
|
||||
return getDesctramo().concat(" - ").concat(this.getVia().getNombvia());
|
||||
}
|
||||
public void setLsOrgaoTramo(List<OrgaoTramo> lsOrgaoTramo) {
|
||||
this.lsOrgaoTramo = lsOrgaoTramo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (!(object instanceof Tramo)) {
|
||||
return false;
|
||||
}
|
||||
Tramo other = (Tramo) object;
|
||||
if ((this.tramoId == null && other.tramoId != null) || (this.tramoId != null && !this.tramoId.equals(other.tramoId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public List<TramoKm> getTramoKms() {
|
||||
return tramoKms;
|
||||
}
|
||||
|
||||
public void setTramoKms(List<TramoKm> tramoKms) {
|
||||
this.tramoKms = tramoKms;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getDesctramo().concat(" - ").concat(this.getVia().getNombvia());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue