diff --git a/src/com/rjconsultores/ventaboletos/entidad/PacoteTarifa.java b/src/com/rjconsultores/ventaboletos/entidad/PacoteTarifa.java index 9d9286abd..4ab3441a6 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/PacoteTarifa.java +++ b/src/com/rjconsultores/ventaboletos/entidad/PacoteTarifa.java @@ -45,6 +45,10 @@ public class PacoteTarifa implements Serializable { private TipoTarifaPacote tipoTarifaPacote; @Column(name = "INDVENDAWEB") private Boolean indvendaweb; + @JoinColumn(name = "CATEGORIA_ID", referencedColumnName = "CATEGORIA_ID") + @ManyToOne + private Categoria categoria; + public PacoteTarifa() { super(); @@ -152,4 +156,12 @@ public class PacoteTarifa implements Serializable { this.indvendaweb = indvendaweb; } + public Categoria getCategoria() { + return categoria; + } + + public void setCategoria(Categoria categoria) { + this.categoria = categoria; + } + } diff --git a/src/com/rjconsultores/ventaboletos/service/PacoteTarifaService.java b/src/com/rjconsultores/ventaboletos/service/PacoteTarifaService.java index 4471ff870..8073614ff 100644 --- a/src/com/rjconsultores/ventaboletos/service/PacoteTarifaService.java +++ b/src/com/rjconsultores/ventaboletos/service/PacoteTarifaService.java @@ -3,13 +3,14 @@ package com.rjconsultores.ventaboletos.service; import java.math.BigDecimal; import java.util.List; +import com.rjconsultores.ventaboletos.entidad.Categoria; import com.rjconsultores.ventaboletos.entidad.Pacote; import com.rjconsultores.ventaboletos.entidad.PacoteTarifa; import com.rjconsultores.ventaboletos.entidad.TipoTarifaPacote; public interface PacoteTarifaService extends GenericService { - public PacoteTarifa vincularPacoteTarifa(PacoteTarifa pacoteTarifa, Pacote pacote, TipoTarifaPacote tipoTarifaPacote, BigDecimal tarifa, Boolean indvendaweb); + public PacoteTarifa vincularPacoteTarifa(PacoteTarifa pacoteTarifa, Pacote pacote, TipoTarifaPacote tipoTarifaPacote, BigDecimal tarifa, Boolean indvendaweb, Categoria categoria); public PacoteTarifa buscaPacoteTarifa(Pacote pacote, TipoTarifaPacote tipoTarifaPacote); diff --git a/src/com/rjconsultores/ventaboletos/service/impl/PacoteTarifaServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/PacoteTarifaServiceImpl.java index 48063ca4d..0350074c7 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/PacoteTarifaServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/PacoteTarifaServiceImpl.java @@ -9,6 +9,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.rjconsultores.ventaboletos.dao.PacoteTarifaDAO; +import com.rjconsultores.ventaboletos.entidad.Categoria; import com.rjconsultores.ventaboletos.entidad.Pacote; import com.rjconsultores.ventaboletos.entidad.PacoteTarifa; import com.rjconsultores.ventaboletos.entidad.TipoTarifaPacote; @@ -63,7 +64,7 @@ public class PacoteTarifaServiceImpl implements PacoteTarifaService { @Transactional(readOnly = false) @Override - public PacoteTarifa vincularPacoteTarifa(PacoteTarifa pacoteTarifa, Pacote pacote, TipoTarifaPacote tipoTarifaPacote, BigDecimal tarifa, Boolean indvendaweb) { + public PacoteTarifa vincularPacoteTarifa(PacoteTarifa pacoteTarifa, Pacote pacote, TipoTarifaPacote tipoTarifaPacote, BigDecimal tarifa, Boolean indvendaweb, Categoria categoria) { if (pacoteTarifa == null) { pacoteTarifa = new PacoteTarifa(); @@ -73,6 +74,7 @@ public class PacoteTarifaServiceImpl implements PacoteTarifaService { pacoteTarifa.setTarifa(tarifa); pacoteTarifa.setTipoTarifaPacote(tipoTarifaPacote); pacoteTarifa.setPacote(pacote); + pacoteTarifa.setCategoria(categoria); if (pacoteTarifa.getPacotetarifaId() == null) { return suscribir(pacoteTarifa);