fixes bug #7867 - indice pegadagio por classe
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@60095 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8d16dde676
commit
4a62420fab
|
@ -27,7 +27,7 @@
|
|||
<classpathentry kind="lib" path="/LibreriasAdmVenta/ehcache-1.2.3.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/fckez.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/iText-2.1.7.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/javassist-3.9.0.GA.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/javassist-3.9.0.GA.jar" sourcepath="C:/Users/vpaiva/.m2/repository/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA-sources.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/jcommon.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/jdbc2_0-stdext.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/js.jar"/>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zcommon.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zcommons-el.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zhtml.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zk.jar" sourcepath="C:/Users/rjgw/.m2/repository/org/zkoss/zk/zk/5.0.9/zk-5.0.9-sources.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zk.jar" sourcepath="C:/Users/vpaiva/.m2/repository/org/zkoss/zk/zk/5.0.9/zk-5.0.9-sources.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zkplus.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zul.jar"/>
|
||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/zweb.jar"/>
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
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.ManyToOne;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name = "CLASSE_INDICE_PEAJE_SEQ", sequenceName = "CLASSE_INDICE_PEAJE_SEQ", initialValue = 1)
|
||||
@Table(name = "CLASSE_INDICE_PEAJE")
|
||||
public class ClasseIndicePeaje implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Column(name = "CLASSE_INDICE_PEAJE_ID")
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CLASSE_INDICE_PEAJE_SEQ")
|
||||
private Long id;
|
||||
|
||||
@Column
|
||||
private Boolean activo;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "CLASSE_SERVICIO_ID")
|
||||
private ClaseServicio classeServicio;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "ORGAOCONCEDENTE_ID")
|
||||
private OrgaoConcedente orgaoConcedente;
|
||||
|
||||
@Column(name = "INDICE_PEAJE")
|
||||
private BigDecimal indicePeaje;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public ClaseServicio getClasseServicio() {
|
||||
return classeServicio;
|
||||
}
|
||||
|
||||
public void setClasseServicio(ClaseServicio classeServicio) {
|
||||
this.classeServicio = classeServicio;
|
||||
}
|
||||
|
||||
public OrgaoConcedente getOrgaoConcedente() {
|
||||
return orgaoConcedente;
|
||||
}
|
||||
|
||||
public void setOrgaoConcedente(OrgaoConcedente orgaoConcedente) {
|
||||
this.orgaoConcedente = orgaoConcedente;
|
||||
}
|
||||
|
||||
public BigDecimal getIndicePeaje() {
|
||||
return indicePeaje;
|
||||
}
|
||||
|
||||
public void setIndicePeaje(BigDecimal indicePeaje) {
|
||||
this.indicePeaje = indicePeaje;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return new EqualsBuilder().append(this.id, ((ClasseIndicePeaje) obj).getId()).isEquals();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return classeServicio.getDescclase() + " " + indicePeaje.toString();
|
||||
}
|
||||
}
|
|
@ -18,8 +18,8 @@ import javax.persistence.Temporal;
|
|||
import javax.persistence.TemporalType;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name = "ORGAO_CANCELACION_SEQ", sequenceName = "ORGAO_CANCELACION_SEQ", allocationSize = 1)
|
||||
@Table(name = "ORGAO_CANCELACION")
|
||||
@SequenceGenerator(name = "ORGAO_CANCELACION_SEQ", sequenceName = "ORGAO_CANCELACION_SEQ", allocationSize = 1)
|
||||
public class OrgaoCancelacion implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -119,4 +119,6 @@ public class OrgaoCancelacion implements Serializable {
|
|||
public void setIndnaopermitetransferencia(Boolean indnaopermitetransferencia) {
|
||||
this.indnaopermitetransferencia = indnaopermitetransferencia;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,10 +2,12 @@ package com.rjconsultores.ventaboletos.entidad;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
|
@ -51,11 +53,14 @@ public class OrgaoConcedente implements Serializable {
|
|||
@Column(name = "INDICEPEAJE")
|
||||
private BigDecimal indicePeaje;
|
||||
|
||||
public void addParametro(OrgaoCancelacion param){
|
||||
@OneToMany(mappedBy = "orgaoConcedente", cascade = CascadeType.ALL)
|
||||
private List<ClasseIndicePeaje> classesIndicePeaje;
|
||||
|
||||
public void addParametro(OrgaoCancelacion param) {
|
||||
this.orgaoCancelacionList.add(param);
|
||||
}
|
||||
|
||||
public void removeParametro(OrgaoCancelacion param){
|
||||
public void removeParametro(OrgaoCancelacion param) {
|
||||
this.orgaoCancelacionList.remove(param);
|
||||
}
|
||||
|
||||
|
@ -115,8 +120,6 @@ public class OrgaoConcedente implements Serializable {
|
|||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<CategoriaOrgao> getCategoriaOrgaoList() {
|
||||
return categoriaOrgaoList;
|
||||
}
|
||||
|
@ -149,6 +152,20 @@ public class OrgaoConcedente implements Serializable {
|
|||
this.indicePeaje = indicePeaje;
|
||||
}
|
||||
|
||||
public List<ClasseIndicePeaje> getClassesIndicePeaje() {
|
||||
List<ClasseIndicePeaje> lsClasseIndicePeaje = new ArrayList<ClasseIndicePeaje>();
|
||||
for (ClasseIndicePeaje classeIndicePeaje : this.classesIndicePeaje) {
|
||||
if (classeIndicePeaje.getActivo()) {
|
||||
lsClasseIndicePeaje.add(classeIndicePeaje);
|
||||
}
|
||||
}
|
||||
return this.classesIndicePeaje = lsClasseIndicePeaje;
|
||||
}
|
||||
|
||||
public void setClassesIndicePeaje(List<ClasseIndicePeaje> classesIndicePeaje) {
|
||||
this.classesIndicePeaje = classesIndicePeaje;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return descOrgao;
|
||||
|
@ -178,4 +195,5 @@ public class OrgaoConcedente implements Serializable {
|
|||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue