From b65b27df0b45f66987080bd61656482b6989df29 Mon Sep 17 00:00:00 2001 From: wilian Date: Mon, 19 Dec 2016 17:46:35 +0000 Subject: [PATCH] bug #8389 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@63798 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/entidad/PacoteTarifa.java | 12 ++++++++++++ .../ventaboletos/service/PacoteTarifaService.java | 3 ++- .../service/impl/PacoteTarifaServiceImpl.java | 4 +++- 3 files changed, 17 insertions(+), 2 deletions(-) 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);