diff --git a/src/com/rjconsultores/ventaboletos/entidad/Categoria.java b/src/com/rjconsultores/ventaboletos/entidad/Categoria.java index d8e617769..46bb8e7eb 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/Categoria.java +++ b/src/com/rjconsultores/ventaboletos/entidad/Categoria.java @@ -62,6 +62,9 @@ public class Categoria implements Serializable { @ManyToOne() private GrupoCategoria grupoCategoria; + @OneToMany(mappedBy = "categoria", cascade = CascadeType.ALL) + private List orgaosConcedentes; + @Column(name = "INDCONFERENCIAFISICACOMISSAO") private Boolean indconferenciafisicacomissao; @@ -227,5 +230,13 @@ public class Categoria implements Serializable { public void setIndnaousaassento(Boolean indnaousaassento) { this.indnaousaassento = indnaousaassento; } - + + public List getOrgaosConcedentes() { + return orgaosConcedentes; + } + + public void setOrgaosConcedentes(List orgaosConcedentes) { + this.orgaosConcedentes = orgaosConcedentes; + } + } diff --git a/src/com/rjconsultores/ventaboletos/entidad/GrupoCategoria.java b/src/com/rjconsultores/ventaboletos/entidad/GrupoCategoria.java index 219cba717..35d9bd44b 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/GrupoCategoria.java +++ b/src/com/rjconsultores/ventaboletos/entidad/GrupoCategoria.java @@ -1,5 +1,6 @@ package com.rjconsultores.ventaboletos.entidad; +import java.io.Serializable; import java.util.Date; import javax.persistence.Basic; @@ -16,7 +17,7 @@ import javax.persistence.TemporalType; @Entity @SequenceGenerator(name = "GRUPO_CATEGORIA_SEQ", sequenceName = "GRUPO_CATEGORIA_SEQ", allocationSize = 1) @Table(name = "GRUPO_CATEGORIA") -public class GrupoCategoria { +public class GrupoCategoria implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic(optional = false) diff --git a/src/com/rjconsultores/ventaboletos/entidad/OrgaoConcedente.java b/src/com/rjconsultores/ventaboletos/entidad/OrgaoConcedente.java index 5d07216f4..e3c6300e7 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/OrgaoConcedente.java +++ b/src/com/rjconsultores/ventaboletos/entidad/OrgaoConcedente.java @@ -13,6 +13,8 @@ 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.OneToMany; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @@ -54,6 +56,11 @@ public class OrgaoConcedente implements Serializable { private BigDecimal indicePeaje; @Column(name = "IDADE_IDOSO") private Integer idadeIdoso; + @Column(name = "IDADE_MINIMA") + private Integer idadeMinima; + @JoinColumn(name = "CATEGORIA_ID", referencedColumnName = "CATEGORIA_ID") + @ManyToOne() + private Categoria categoria; @OneToMany(mappedBy = "orgaoConcedente", cascade = CascadeType.ALL) private List classesIndicePeaje; @@ -174,6 +181,22 @@ public class OrgaoConcedente implements Serializable { public void setClassesIndicePeaje(List classesIndicePeaje) { this.classesIndicePeaje = classesIndicePeaje; + } + + public Integer getIdadeMinima() { + return idadeMinima; + } + + public void setIdadeMinima(Integer idadeMinima) { + this.idadeMinima = idadeMinima; + } + + public Categoria getCategoria() { + return categoria; + } + + public void setCategoria(Categoria categoria) { + this.categoria = categoria; } @Override