diff --git a/pom.xml b/pom.xml
index ac312cbfa..7a906805a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
br.com.rjconsultores
ModelWeb
- 1.0.45
+ 1.0.46
rj-releases
diff --git a/src/com/rjconsultores/ventaboletos/constantes/ConstantesFuncionSistema.java b/src/com/rjconsultores/ventaboletos/constantes/ConstantesFuncionSistema.java
index a69b30f3e..7d413e1ad 100644
--- a/src/com/rjconsultores/ventaboletos/constantes/ConstantesFuncionSistema.java
+++ b/src/com/rjconsultores/ventaboletos/constantes/ConstantesFuncionSistema.java
@@ -34,4 +34,11 @@ public class ConstantesFuncionSistema {
public static final String CLAVE_RELATORIO_PRICING_ESPECIFICO = "COM.RJCONSULTORES.ADMINISTRACION.GUI.PRICING.MENU.RELATORIOPRICINGESPECIFICO";
public static final String CLAVE_MODIFICACAO_EMBARCADA = "COM.RJCONSULTORES.ADMINISTRACION.GUI.TARIFAS.MENU.MODIFICACIONMASIVAEMBARCADA";
public static final String CLAVE_AUTORIZACAO_RUTA = "COM.RJCONSULTORES.ADMINISTRACION.GUI.ESQUEMAOPERACIONAL.MENU.AUTORIZACAORUTA";
+
+ public static final String CLAVE_MENU_GESTAO_PRICING = "COM.RJCONSULTORES.ADMINISTRACION.GUI.GESTAODEPRICING";
+ public static final String CLAVE_GESTAO_PRICING_ESPECIFICO = "COM.RJCONSULTORES.ADMINISTRACION.GUI.GESTAODEPRICING.PRICINGESPECIFICO";
+ public static final String CLAVE_GESTAO_PRICING = "COM.RJCONSULTORES.ADMINISTRACION.GUI.GESTAODEPRICING.PRICING";
+ public static final String CLAVE_TELA_GESTAO_PRICING = "COM.RJCONSULTORES.ADMINISTRACION.GUI.GESTAODEPRICING.GESTAOPRICING";
+ public static final String CLAVE_MENU_RELATORIOS_MUDANCAS = "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.RELATORIOSDEMUDANCAS";
+ public static final String CLAVE_MENU_RELATORIOS_MUDANCAS_PRICING = "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.RELATORIOSDEMUDANCAS.RELATORIOSDEMUDANCASPRICING";
}
diff --git a/src/com/rjconsultores/ventaboletos/dao/CorridaDAO.java b/src/com/rjconsultores/ventaboletos/dao/CorridaDAO.java
index 7a430afd4..1240280ea 100644
--- a/src/com/rjconsultores/ventaboletos/dao/CorridaDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/CorridaDAO.java
@@ -11,6 +11,7 @@ import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
import com.rjconsultores.ventaboletos.entidad.Corrida;
import com.rjconsultores.ventaboletos.entidad.Corrida.Id;
import com.rjconsultores.ventaboletos.entidad.DiagramaAutobus;
+import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.entidad.Marca;
import com.rjconsultores.ventaboletos.entidad.Parada;
@@ -105,5 +106,8 @@ public interface CorridaDAO extends GenericDAO {
public CorridaVO buscarVOPorId(Id corridaId);
- public Integer buscarOcupacaoCorrida(Corrida corrida);
+ public Integer buscarOcupacaoCorrida(Corrida corrida);
+
+ public List buscarCorridas(Parada ori, Parada des, Date dataInicio, Date dataFinal, ClaseServicio cs,
+ Ruta linha, Empresa empresa);
}
\ No newline at end of file
diff --git a/src/com/rjconsultores/ventaboletos/dao/CorridaTramoDAO.java b/src/com/rjconsultores/ventaboletos/dao/CorridaTramoDAO.java
index 4128ae82b..9ce9638d3 100644
--- a/src/com/rjconsultores/ventaboletos/dao/CorridaTramoDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/CorridaTramoDAO.java
@@ -5,6 +5,7 @@ import java.util.List;
import com.rjconsultores.ventaboletos.entidad.Corrida;
import com.rjconsultores.ventaboletos.entidad.CorridaTramo;
+import com.rjconsultores.ventaboletos.entidad.Tramo;
public interface CorridaTramoDAO extends GenericDAO {
@@ -15,5 +16,7 @@ public interface CorridaTramoDAO extends GenericDAO {
List buscarCorridaTramoPorCorrida(Corrida corrida);
public BigDecimal buscarSumTarjetaMesmaCorrida(CorridaTramo ct);
+
+ List buscarTramoPorCorridaId(Integer corridaId);
}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingAsientoDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingAsientoDAO.java
new file mode 100644
index 000000000..ac3f4c425
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingAsientoDAO.java
@@ -0,0 +1,13 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingAsiento;
+
+public interface GP_PricingAsientoDAO extends GenericDAO {
+
+ public List obtenerPricingCategoria(GP_Pricing pricing, Integer asiento);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingCategoriaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingCategoriaDAO.java
new file mode 100644
index 000000000..67848b9db
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingCategoriaDAO.java
@@ -0,0 +1,22 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.Categoria;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingCategoria;
+
+/**
+ *
+ * @author Rafius
+ */
+public interface GP_PricingCategoriaDAO extends GenericDAO {
+
+ public Boolean obtenerPricingCategoria(GP_Pricing pricing, Categoria categoria);
+
+ List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingClaseDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingClaseDAO.java
new file mode 100644
index 000000000..06c6c3587
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingClaseDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingClase;
+
+public interface GP_PricingClaseDAO extends GenericDAO {
+
+ public Boolean obtenerPricingClase(GP_Pricing pricing, ClaseServicio claseServicio);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingClasseTarifariaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingClasseTarifariaDAO.java
new file mode 100644
index 000000000..b3bc38cac
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingClasseTarifariaDAO.java
@@ -0,0 +1,9 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import com.rjconsultores.ventaboletos.entidad.GP_PricingClasseTarifaria;
+
+public interface GP_PricingClasseTarifariaDAO extends GenericDAO {
+
+ public Boolean validacionSigla(String sigla);
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingCorridaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingCorridaDAO.java
new file mode 100644
index 000000000..314600d8d
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingCorridaDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.CorridaCtrl;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingCorrida;
+
+public interface GP_PricingCorridaDAO extends GenericDAO {
+
+ public Boolean obtenerPricingCorrida(GP_Pricing pricing, CorridaCtrl corrida);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingDAO.java
new file mode 100644
index 000000000..b8e122619
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingDAO.java
@@ -0,0 +1,20 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.Empresa;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingVigencia;
+import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingRevisaoValoresVO;
+
+public interface GP_PricingDAO extends GenericDAO {
+
+ public List buscar(String nombPricing, Empresa empresa,
+ Short cantboleto, Integer cantdiasanticipacion,
+ BigDecimal descuentoporcentaje, BigDecimal descuentoporcredondo);
+
+ public List buscarPorNombre(String nombPricing);
+
+ public List buscarPricingRevisaoValoresVO(List classeServicioIds,List marcaIds, List rutaIds, List tramoIds, List lsPricingVigencia);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingDiaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingDiaDAO.java
new file mode 100644
index 000000000..a84b4e803
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingDiaDAO.java
@@ -0,0 +1,13 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingDia;
+
+public interface GP_PricingDiaDAO extends GenericDAO {
+
+ public List buscarTraslapa(GP_PricingDia pricingDia);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoAgenciaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoAgenciaDAO.java
new file mode 100644
index 000000000..7013bbe3b
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoAgenciaDAO.java
@@ -0,0 +1,9 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoAgencia;
+
+public interface GP_PricingEspecificoAgenciaDAO extends GenericDAO {
+
+ Boolean isDuplicado(GP_PricingEspecificoAgencia entidad);
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoCanalVendasDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoCanalVendasDAO.java
new file mode 100644
index 000000000..536b9f75f
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoCanalVendasDAO.java
@@ -0,0 +1,9 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCanalVendas;
+
+public interface GP_PricingEspecificoCanalVendasDAO extends GenericDAO {
+
+ Boolean isDuplicado(GP_PricingEspecificoCanalVendas entidad);
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoCategoriaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoCategoriaDAO.java
new file mode 100644
index 000000000..3d37ac53b
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoCategoriaDAO.java
@@ -0,0 +1,9 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCategoria;
+
+public interface GP_PricingEspecificoCategoriaDAO extends GenericDAO {
+
+ Boolean isDuplicado(GP_PricingEspecificoCategoria entidad);
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoDAO.java
new file mode 100644
index 000000000..3eb9fae58
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoDAO.java
@@ -0,0 +1,19 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.Date;
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
+import com.rjconsultores.ventaboletos.entidad.Empresa;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecifico;
+import com.rjconsultores.ventaboletos.entidad.Parada;
+
+
+public interface GP_PricingEspecificoDAO extends GenericDAO {
+
+ public List buscarPorNome(GP_PricingEspecifico pricingEspecifico);
+
+ public List buscarPorNome(String nome);
+
+ public List buscar(List empresas, List tipoClasses, List origens, List destinos, Date vigenciaInicial, Date vigenciaFinal);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoOcupacionDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoOcupacionDAO.java
new file mode 100644
index 000000000..d648e657d
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingEspecificoOcupacionDAO.java
@@ -0,0 +1,7 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoOcupacion;
+
+public interface GP_PricingEspecificoOcupacionDAO extends GenericDAO {
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingFormapagoDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingFormapagoDAO.java
new file mode 100644
index 000000000..a6b0365d9
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingFormapagoDAO.java
@@ -0,0 +1,11 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingFormapago;
+
+public interface GP_PricingFormapagoDAO extends GenericDAO {
+
+ List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingGestaoDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingGestaoDAO.java
new file mode 100644
index 000000000..5c42346a9
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingGestaoDAO.java
@@ -0,0 +1,7 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import com.rjconsultores.ventaboletos.entidad.GP_PricingGestao;
+
+public interface GP_PricingGestaoDAO extends GenericDAO {
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingHistoricoDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingHistoricoDAO.java
new file mode 100644
index 000000000..0c0b5b377
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingHistoricoDAO.java
@@ -0,0 +1,8 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import com.rjconsultores.ventaboletos.entidad.GP_PricingHistorico;
+
+
+public interface GP_PricingHistoricoDAO extends GenericDAO {
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingImporteDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingImporteDAO.java
new file mode 100644
index 000000000..6236a8610
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingImporteDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingImporte;
+import com.rjconsultores.ventaboletos.entidad.Moneda;
+
+public interface GP_PricingImporteDAO extends GenericDAO {
+
+ public List buscarMoneda(GP_PricingImporte pricingImporte, Moneda moneda);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingMarcaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingMarcaDAO.java
new file mode 100644
index 000000000..60f6e7ecc
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingMarcaDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingMarca;
+import com.rjconsultores.ventaboletos.entidad.Marca;
+
+public interface GP_PricingMarcaDAO extends GenericDAO {
+
+ public Boolean obtenerPricingMarca(GP_Pricing pricing, Marca marca);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingMercadoDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingMercadoDAO.java
new file mode 100644
index 000000000..c4fcfcf8c
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingMercadoDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingMercado;
+import com.rjconsultores.ventaboletos.entidad.Parada;
+
+public interface GP_PricingMercadoDAO extends GenericDAO {
+
+ public Boolean obtenerPricingMercado(GP_Pricing pricing, Parada origen, Parada destino);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingOcupaAntecipaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingOcupaAntecipaDAO.java
new file mode 100644
index 000000000..d617a4379
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingOcupaAntecipaDAO.java
@@ -0,0 +1,16 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingOcupaAntecipa;
+
+public interface GP_PricingOcupaAntecipaDAO extends GenericDAO {
+
+
+ public List buscarOcupaAntecipaPricing(Integer pricingId);
+
+ public List buscarOcupaAntecipaPricingAtivos(Integer pricingId);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingPuntoVentaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingPuntoVentaDAO.java
new file mode 100644
index 000000000..b3eab837c
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingPuntoVentaDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingPuntoVenta;
+import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
+
+public interface GP_PricingPuntoVentaDAO extends GenericDAO {
+
+ public Boolean obtenerPricingPuntoVenta(GP_Pricing pricing, PuntoVenta puntoVenta);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingRutaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingRutaDAO.java
new file mode 100644
index 000000000..3c9120c37
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingRutaDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingRuta;
+import com.rjconsultores.ventaboletos.entidad.Ruta;
+
+public interface GP_PricingRutaDAO extends GenericDAO {
+
+ public Boolean obtenerPricingRuta(GP_Pricing pricing, Ruta ruta);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingTipoPtoVtaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingTipoPtoVtaDAO.java
new file mode 100644
index 000000000..79fc76cbb
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingTipoPtoVtaDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingTipoPtoVta;
+import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
+
+public interface GP_PricingTipoPtoVtaDAO extends GenericDAO {
+
+ public Boolean obtenerPricingTipoPuntoVenta(GP_Pricing pricing, TipoPuntoVenta tipoPuntoVenta);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingTipoServicioDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingTipoServicioDAO.java
new file mode 100644
index 000000000..ccab61415
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingTipoServicioDAO.java
@@ -0,0 +1,14 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingTipoServicio;
+import com.rjconsultores.ventaboletos.entidad.TipoServicio;
+
+public interface GP_PricingTipoServicioDAO extends GenericDAO {
+
+ public Boolean obtenerPricingTipoServicio(GP_Pricing pricing, TipoServicio tipoServicio);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/GP_PricingVigenciaDAO.java b/src/com/rjconsultores/ventaboletos/dao/GP_PricingVigenciaDAO.java
new file mode 100644
index 000000000..624241c16
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/GP_PricingVigenciaDAO.java
@@ -0,0 +1,17 @@
+package com.rjconsultores.ventaboletos.dao;
+
+import java.util.Date;
+import java.util.List;
+
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingVigencia;
+
+public interface GP_PricingVigenciaDAO extends GenericDAO {
+
+ public List buscarPorVigencias(GP_PricingVigencia pv);
+
+ public Boolean podeSalvar(GP_Pricing pricing, GP_PricingVigencia pricingVigencia,
+ Date inicio, Date fim);
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing);
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/TramoDAO.java b/src/com/rjconsultores/ventaboletos/dao/TramoDAO.java
index d68639b2a..5fa93d35c 100644
--- a/src/com/rjconsultores/ventaboletos/dao/TramoDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/TramoDAO.java
@@ -53,4 +53,5 @@ public interface TramoDAO extends GenericDAO {
public List buscarListaPorIds(List tramoIds, String chaveCorrida, boolean tarifaEmbarcada) throws Exception;
+ List obtenerTramosPorOrigemDestino(Parada origem, Parada destino);
}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaHibernateDAO.java
index 8bd6e24b7..c8b5fbf19 100644
--- a/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaHibernateDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaHibernateDAO.java
@@ -38,6 +38,7 @@ import com.rjconsultores.ventaboletos.entidad.Corrida;
import com.rjconsultores.ventaboletos.entidad.Corrida.Id;
import com.rjconsultores.ventaboletos.entidad.CorridaTramo;
import com.rjconsultores.ventaboletos.entidad.DiagramaAutobus;
+import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.entidad.Marca;
import com.rjconsultores.ventaboletos.entidad.Parada;
@@ -1113,5 +1114,80 @@ public class CorridaHibernateDAO extends GenericHibernateDAO buscarCorridas(Parada ori, Parada des, Date dataInicial, Date dataFinal, ClaseServicio cs,
+ Ruta linha, Empresa empresa) {
+
+ StringBuilder hql = new StringBuilder("");
+ hql.append("select distinct ");
+ hql.append(" new com.rjconsultores.ventaboletos.entidad.Corrida(");
+ hql.append(" c.marca, ");
+ hql.append(" c.id.corridaId, ");
+ hql.append(" c.id.feccorrida, ");
+ hql.append(" c.origem, ");
+ hql.append(" c.destino, ");
+ hql.append(" c.claseServicio, ");
+ hql.append(" c.corridaCtrl.horario) ");
+ hql.append("from ");
+ hql.append(" Corrida c ");
+ hql.append(" where c.activo = 1 ");
+
+ if (empresa != null) {
+ hql.append(" and c.empresa = :empresa ");
+ }
+ if (linha != null) {
+ hql.append(" and c.ruta = :linha ");
+ }
+ if (ori != null) {
+ hql.append(" and c.origem = :origen ");
+ }
+ if (des != null) {
+ hql.append(" and c.destino = :destino");
+ }
+ if (cs != null) {
+ hql.append(" and c.claseServicio = :claseServicio ");
+ }
+ if (dataInicial != null) {
+
+ hql.append(" and c.corridaCtrl.horario >= :horaSalidaInicio");
+ }
+ if (dataFinal != null) {
+
+ hql.append(" and c.corridaCtrl.horario <= :horaSalidaFin");
+ }
+
+ hql.append(" order by c.id.corridaId,c.corridaCtrl.horario");
+
+ Query query = getSession().createQuery(hql.toString());
+
+ if (empresa != null) {
+ query.setParameter("empresa", empresa);
+ }
+ if (linha != null) {
+ query.setParameter("linha", linha);
+ }
+ if (ori != null) {
+ query.setParameter("origen", ori);
+ }
+ if (des != null) {
+ query.setParameter("destino", des);
+ }
+ if (cs != null) {
+ query.setParameter("claseServicio", cs);
+ }
+
+ if (dataInicial != null) {
+
+ query.setParameter("horaSalidaInicio", dataInicial);
+ }
+ if (dataFinal != null) {
+ query.setParameter("horaSalidaFin", dataFinal);
+
+ }
+
+ return query.list();
+ }
}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaTramoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaTramoHibernateDAO.java
index 3ac6058d2..a00763952 100644
--- a/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaTramoHibernateDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/CorridaTramoHibernateDAO.java
@@ -8,6 +8,7 @@ import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.hibernate.transform.AliasToBeanResultTransformer;
import org.hibernate.type.ShortType;
@@ -19,6 +20,7 @@ import org.springframework.stereotype.Repository;
import com.rjconsultores.ventaboletos.dao.CorridaTramoDAO;
import com.rjconsultores.ventaboletos.entidad.Corrida;
import com.rjconsultores.ventaboletos.entidad.CorridaTramo;
+import com.rjconsultores.ventaboletos.entidad.Tramo;
import com.rjconsultores.ventaboletos.utilerias.ActivoUtil;
@Repository("corridaTramoDAO")
@@ -93,4 +95,15 @@ public class CorridaTramoHibernateDAO extends GenericHibernateDAO buscarTramoPorCorridaId(Integer corridaId) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", ActivoUtil.ATIVO));
+ c.createAlias("corrida", "corrida");
+ c.add(Restrictions.eq("corrida.id.corridaId", corridaId));
+ c.setProjection(Projections.distinct(Projections.property("tramo")));
+
+ return c.list();
+ }
+
}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingAsientoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingAsientoHibernateDAO.java
new file mode 100644
index 000000000..01ae86a59
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingAsientoHibernateDAO.java
@@ -0,0 +1,50 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingAsientoDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingAsiento;
+import com.rjconsultores.ventaboletos.entidad.Pricing;
+
+@Repository("gp_pricingAsientoDAO")
+public class GP_PricingAsientoHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingAsientoDAO {
+
+ @Autowired
+ public GP_PricingAsientoHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public List obtenerPricingCategoria(GP_Pricing pricing, Integer asiento) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("numeasiento", asiento.toString()));
+
+ return c.list();
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingCategoriaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingCategoriaHibernateDAO.java
new file mode 100644
index 000000000..779673d08
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingCategoriaHibernateDAO.java
@@ -0,0 +1,54 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingCategoriaDAO;
+import com.rjconsultores.ventaboletos.entidad.Categoria;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingCategoria;
+
+@Repository("gp_pricingCategoriaDAO")
+public class GP_PricingCategoriaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingCategoriaDAO {
+
+ @Autowired
+ public GP_PricingCategoriaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingCategoria(GP_Pricing pricing, Categoria categoria) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("categoria", categoria));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingClaseHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingClaseHibernateDAO.java
new file mode 100644
index 000000000..8a2819be3
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingClaseHibernateDAO.java
@@ -0,0 +1,55 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingClaseDAO;
+import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingClase;
+
+@Repository("gp_pricingClaseDAO")
+public class GP_PricingClaseHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingClaseDAO {
+
+ @Autowired
+ public GP_PricingClaseHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingClase(GP_Pricing pricing, ClaseServicio claseServicio) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("claseServicio", claseServicio));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingClasseTarifariaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingClasseTarifariaHibernateDAO.java
new file mode 100644
index 000000000..07a40e165
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingClasseTarifariaHibernateDAO.java
@@ -0,0 +1,51 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingClasseTarifariaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingClasseTarifaria;
+
+@Repository("gp_pricingClasseTarifariaDAO")
+public class GP_PricingClasseTarifariaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingClasseTarifariaDAO {
+
+ @Autowired
+ public GP_PricingClasseTarifariaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+
+ return c.list();
+ }
+
+ public Boolean validacionSigla(String sigla) {
+
+ StringBuffer hql = new StringBuffer();
+ hql.append(" FROM GP_PricingClasseTarifaria pct ");
+ hql.append(" WHERE pct.sigla = :sigla ");
+ hql.append(" AND pct.activo = :activo ");
+
+ Query query = getSession().createQuery(hql.toString());
+ query.setParameter("activo", Boolean.TRUE);
+ query.setParameter("sigla", sigla);
+
+ if (query.list().isEmpty())
+ return true;
+ else
+ return false;
+ }
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingCorridaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingCorridaHibernateDAO.java
new file mode 100644
index 000000000..451831888
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingCorridaHibernateDAO.java
@@ -0,0 +1,54 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingCorridaDAO;
+import com.rjconsultores.ventaboletos.entidad.CorridaCtrl;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingCorrida;
+
+@Repository("gp_pricingCorridaDAO")
+public class GP_PricingCorridaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingCorridaDAO {
+
+ @Autowired
+ public GP_PricingCorridaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingCorrida(GP_Pricing pricing, CorridaCtrl corrida) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("corridaCtrl", corrida));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingDiaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingDiaHibernateDAO.java
new file mode 100644
index 000000000..35aaed7d1
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingDiaHibernateDAO.java
@@ -0,0 +1,71 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingDiaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingDia;
+import com.rjconsultores.ventaboletos.entidad.Pricing;
+
+@Repository("gp_pricingDiaDAO")
+public class GP_PricingDiaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingDiaDAO {
+
+ private static Logger log = Logger.getLogger(GP_PricingDiaHibernateDAO.class);
+
+ @Autowired
+ public GP_PricingDiaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public List buscarTraslapa(GP_PricingDia pricingDia) {
+ Date horarioinicio = pricingDia.getHorarioinicio();
+ Date horariofin = pricingDia.getHorariofin();
+
+ SimpleDateFormat sf = new SimpleDateFormat("HHmm");
+
+ StringBuilder hql = new StringBuilder();
+ hql.append("select pv from GP_PricingDia pv ");
+ hql.append(" where pv.activo = 1 ");
+ hql.append(" and pricing.pricingId = ").append(pricingDia.getPricing().getPricingId());
+ hql.append(" and pv.horariofin >= :horariofin ");
+ hql.append(" and pv.horarioinicio >= :horarioinicio ");
+
+ log.info("Hora Ini: " + sf.format(horarioinicio));
+ log.info("Hora Fin: " + sf.format(horariofin));
+ log.info("SQL: " + hql.toString());
+
+ Query sq = getSession().createQuery(hql.toString());
+ sq.setParameter("horariofin", horariofin);
+ sq.setParameter("horarioinicio", horarioinicio);
+
+ return sq.list();
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoAgenciaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoAgenciaHibernateDAO.java
new file mode 100644
index 000000000..389219fe0
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoAgenciaHibernateDAO.java
@@ -0,0 +1,42 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingEspecificoAgenciaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoAgencia;
+
+
+@Repository("gp_pricingEspecificoAgenciaDAO")
+public class GP_PricingEspecificoAgenciaHibernateDAO extends GenericHibernateDAO implements GP_PricingEspecificoAgenciaDAO {
+
+ @Autowired
+ public GP_PricingEspecificoAgenciaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+
+ return c.list();
+ }
+ @SuppressWarnings("unchecked")
+ @Override
+ public Boolean isDuplicado(GP_PricingEspecificoAgencia entidad) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+ c.add(Restrictions.eq("puntoVenta.puntoventaId", entidad.getPuntoVenta().getPuntoventaId()));
+
+ return c.list().isEmpty();
+ }
+}
+
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoCanalVendasHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoCanalVendasHibernateDAO.java
new file mode 100644
index 000000000..cfca88517
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoCanalVendasHibernateDAO.java
@@ -0,0 +1,42 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingEspecificoCanalVendasDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCanalVendas;
+
+
+@Repository("gp_pricingEspecificoCanalVendasDAO")
+public class GP_PricingEspecificoCanalVendasHibernateDAO extends GenericHibernateDAO implements GP_PricingEspecificoCanalVendasDAO {
+
+ @Autowired
+ public GP_PricingEspecificoCanalVendasHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+
+ return c.list();
+ }
+ @SuppressWarnings("unchecked")
+ @Override
+ public Boolean isDuplicado(GP_PricingEspecificoCanalVendas entidad) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+ c.add(Restrictions.eq("tipoPtovta.tipoptovtaId", entidad.getTipoPtovta().getTipoptovtaId()));
+
+ return c.list().isEmpty();
+ }
+}
+
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoCategoriaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoCategoriaHibernateDAO.java
new file mode 100644
index 000000000..e0040302b
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoCategoriaHibernateDAO.java
@@ -0,0 +1,40 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingEspecificoCategoriaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoCategoria;
+
+@Repository("gp_pricingEspecificoCategoriaDAO")
+public class GP_PricingEspecificoCategoriaHibernateDAO extends GenericHibernateDAO implements GP_PricingEspecificoCategoriaDAO {
+
+ @Autowired
+ public GP_PricingEspecificoCategoriaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+
+ return c.list();
+ }
+
+ @Override
+ public Boolean isDuplicado(GP_PricingEspecificoCategoria entidad) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+ c.add(Restrictions.eq("categoria.categoriaId", entidad.getCategoria().getCategoriaId()));
+
+ return c.list().isEmpty();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoHibernateDAO.java
new file mode 100644
index 000000000..861d9f1e2
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoHibernateDAO.java
@@ -0,0 +1,129 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.Date;
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingEspecificoDAO;
+import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
+import com.rjconsultores.ventaboletos.entidad.Empresa;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecifico;
+import com.rjconsultores.ventaboletos.entidad.Parada;
+
+/**
+ *
+ * @author Rafius
+ */
+@Repository("gp_pricingEspecificoDAO")
+public class GP_PricingEspecificoHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingEspecificoDAO {
+
+ @Autowired
+ public GP_PricingEspecificoHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+
+ return c.list();
+ }
+
+ public List buscarPorNome(GP_PricingEspecifico pricingEspecifico) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+ c.add(Restrictions.eq("nombPricing", pricingEspecifico.getNombPricing()));
+
+ return c.list();
+ }
+
+ @Override
+ public List buscarPorNome(String nome) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+ c.add(Restrictions.eq("nombPricing", nome));
+
+ return c.list();
+ }
+
+ @Override
+ public List buscar(List empresas, List tipoClasses, List origens, List destinos, Date vigenciaInicial, Date vigenciaFinal) {
+
+ StringBuilder hql = new StringBuilder();
+ hql.append("SELECT DISTINCT pe ");
+ hql.append("FROM GP_PricingEspecifico pe ");
+ hql.append(" WHERE pe.activo = 1 ");
+
+ if (!empresas.isEmpty()) {
+ hql.append(" AND pe.marca.empresa.empresaId IN (");
+ for (Empresa e : empresas) {
+ hql.append(e.getEmpresaId() + ",");
+ }
+ hql.deleteCharAt(hql.length() - 1);
+ hql.append(")");
+ }
+
+ if (!tipoClasses.isEmpty()) {
+ hql.append(" AND pe.claseServicio.claseservicioId IN (");
+ for (ClaseServicio c : tipoClasses) {
+ hql.append(c.getClaseservicioId() + ",");
+ }
+ hql.deleteCharAt(hql.length() - 1);
+ hql.append(")");
+ }
+
+ if (!origens.isEmpty()) {
+ hql.append(" AND pe.parada.paradaId IN (");
+ for (Parada o : origens) {
+ hql.append(o.getParadaId() + ",");
+ }
+ hql.deleteCharAt(hql.length() - 1);
+ hql.append(")");
+ }
+
+ if (!destinos.isEmpty()) {
+ hql.append(" AND pe.parada1.paradaId IN (");
+ for (Parada o : origens) {
+ hql.append(o.getParadaId() + ",");
+ }
+ hql.deleteCharAt(hql.length() - 1);
+ hql.append(")");
+ }
+
+ if (vigenciaInicial != null) {
+ hql.append(" AND YEAR(pe.fechorinicio) >= YEAR(:vigenciaInicial) ");
+ hql.append(" AND MONTH(pe.fechorinicio)>= MONTH(:vigenciaInicial) ");
+ hql.append(" AND DAY(pe.fechorinicio) >= DAY(:vigenciaInicial) ");
+ }
+
+ if (vigenciaFinal != null) {
+ hql.append(" AND YEAR(pe.fechorfin) <= YEAR(:vigenciaFinal) ");
+ hql.append(" AND MONTH(pe.fechorfin) <= MONTH(:vigenciaFinal) ");
+ hql.append(" AND DAY(pe.fechorfin) <= DAY(:vigenciaFinal) ");
+ }
+
+ Query query = getSession().createQuery(hql.toString());
+
+ if (vigenciaInicial != null) {
+ query.setDate("vigenciaInicial", vigenciaInicial);
+ }
+ if (vigenciaFinal != null) {
+ query.setDate("vigenciaFinal", vigenciaFinal);
+ }
+
+ return query.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoOcupacionHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoOcupacionHibernateDAO.java
new file mode 100644
index 000000000..f7775457f
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingEspecificoOcupacionHibernateDAO.java
@@ -0,0 +1,32 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingEspecificoOcupacionDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingEspecificoOcupacion;
+
+
+@Repository("gp_pricingEspecificoOcupacionDAO")
+public class GP_PricingEspecificoOcupacionHibernateDAO extends GenericHibernateDAO implements GP_PricingEspecificoOcupacionDAO {
+
+ @Autowired
+ public GP_PricingEspecificoOcupacionHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingFormapagoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingFormapagoHibernateDAO.java
new file mode 100644
index 000000000..ee543a2a1
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingFormapagoHibernateDAO.java
@@ -0,0 +1,32 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingFormapagoDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingFormapago;
+
+@Repository("gp_pricingFormapagoDAO")
+public class GP_PricingFormapagoHibernateDAO extends GenericHibernateDAO implements GP_PricingFormapagoDAO {
+
+ @Autowired
+ public GP_PricingFormapagoHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingGestaoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingGestaoHibernateDAO.java
new file mode 100644
index 000000000..82b122ee8
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingGestaoHibernateDAO.java
@@ -0,0 +1,33 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingGestaoDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingGestao;
+
+@Repository("gp_pricingGestaoDAO")
+public class GP_PricingGestaoHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingGestaoDAO {
+
+ @Autowired
+ public GP_PricingGestaoHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingHibernateDAO.java
new file mode 100644
index 000000000..6bdc013b6
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingHibernateDAO.java
@@ -0,0 +1,156 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.hibernate.transform.AliasToBeanResultTransformer;
+import org.hibernate.type.BigDecimalType;
+import org.hibernate.type.StringType;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingDAO;
+import com.rjconsultores.ventaboletos.entidad.Empresa;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingVigencia;
+import com.rjconsultores.ventaboletos.vo.pricing.GP_PricingRevisaoValoresVO;
+
+@Repository("gp_pricingDAO")
+public class GP_PricingHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingDAO {
+
+ @Autowired
+ public GP_PricingHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public List buscar(String nombPricing, Empresa empresa,
+ Short cantboleto, Integer cantdiasanticipacion,
+ BigDecimal descuentoporcentaje, BigDecimal descuentoporcredondo) {
+
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ c.add(Restrictions.eq("nombPricing", nombPricing));
+ c.add(Restrictions.eq("empresa", empresa));
+ c.add(Restrictions.eq("cantboleto", cantboleto));
+ c.add(Restrictions.eq("cantdiasanticipacion", cantdiasanticipacion));
+ if (descuentoporcentaje != null) {
+ c.add(Restrictions.eq("descuentoporcentaje", descuentoporcentaje));
+ }
+ if (descuentoporcredondo != null) {
+ c.add(Restrictions.eq("descuentoporcredondo", descuentoporcredondo));
+ }
+
+ return c.list();
+ }
+
+ public List buscarPorNombre(String nombPricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ c.add(Restrictions.eq("nombPricing", nombPricing));
+
+ return c.list();
+ }
+
+ @Override
+ public List buscarPricingRevisaoValoresVO(List classeServicioIds,List marcaIds, List rutaIds, List tramoIds, List lsPricingVigencia) {
+ StringBuilder sql = new StringBuilder();
+ sql.append(" SELECT distinct ");
+ sql.append(" porigen.descparada \"origem\", ");
+ sql.append(" pdestino.descparada \"destino\", ");
+ sql.append(" cs.descclase \"classeServico\", ");
+ sql.append(" coalesce(t.precio,0) + coalesce(t.importetaxaembarque,0) + coalesce(t.importepedagio,0) ");
+ sql.append(" + coalesce(t.importeseguro,0) + coalesce(t.importeoutros,0) \"precioAtual\", ");
+ sql.append(" coalesce(t.precio,0) \"tarifaAtual\", ");
+ sql.append(" coalesce(t.importetaxaembarque,0) \"taxaEmbarque\", ");
+ sql.append(" coalesce(t.importepedagio,0) \"pedagio\", ");
+ sql.append(" coalesce(t.importeseguro,0) \"seguro\", ");
+ sql.append(" coalesce(t.importeoutros,0) \"outros\" ");
+ sql.append(" FROM tarifa t ");
+ sql.append(" join tramo tr on tr.tramo_id = t.tramo_id ");
+ sql.append(" join parada pOrigen on porigen.parada_id = tr.origen_id ");
+ sql.append(" join parada pDestino on pDestino.parada_id = tr.destino_id ");
+ sql.append(" join clase_servicio cs on cs.claseservicio_id = t.claseservicio_id ");
+ sql.append(" join vigencia_tarifa vt on vt.vigenciatarifa_id = t.vigenciatarifa_id ");
+ sql.append(" join marca m on m.marca_id = t.marca_id ");
+ sql.append(" join ruta r on t.ruta_id = r.ruta_id ");
+ sql.append(" where ");
+ sql.append(" t.activo = 1 ");
+ sql.append(" and vt.activo = 1 ");
+ sql.append(" and tr.activo = 1 ");
+ if(lsPricingVigencia!= null && !lsPricingVigencia.isEmpty()) {
+ sql.append(" and (" );
+ for (int i = 1; i <= lsPricingVigencia.size(); i++) {
+ sql.append(" (:dataInicioPricing between vt.feciniciovigencia and vt.fecfinvigencia ");
+ sql.append(" or :dataFimPricing between vt.feciniciovigencia and vt.fecfinvigencia) ");
+ if(i < lsPricingVigencia.size()) {
+ sql.append(" or ");
+ }
+ }
+ sql.append(" )" );
+ }
+
+ if (classeServicioIds != null && !classeServicioIds.isEmpty()) {
+ sql.append(" and cs.claseservicio_id in(:listClasseServicioId) ");
+ }
+ if(tramoIds != null && !tramoIds.isEmpty()) {
+ sql.append(" and tr.tramo_id in (:listTramoId) ");
+ }
+ if (marcaIds != null && !marcaIds.isEmpty()) {
+ sql.append(" and m.marca_id in(:listMarcaId) ");
+ }
+ if (rutaIds != null && !rutaIds.isEmpty()) {
+ sql.append(" and r.ruta_id in(:listRutaId) ");
+ }
+
+ Query query = getSession().createSQLQuery(sql.toString())
+ .addScalar("origem",StringType.INSTANCE)
+ .addScalar("destino",StringType.INSTANCE)
+ .addScalar("classeServico", StringType.INSTANCE)
+ .addScalar("precioAtual", BigDecimalType.INSTANCE)
+ .addScalar("tarifaAtual", BigDecimalType.INSTANCE)
+ .addScalar("taxaEmbarque", BigDecimalType.INSTANCE)
+ .addScalar("pedagio", BigDecimalType.INSTANCE)
+ .addScalar("seguro", BigDecimalType.INSTANCE)
+ .addScalar("outros", BigDecimalType.INSTANCE)
+ .setResultTransformer(new AliasToBeanResultTransformer(GP_PricingRevisaoValoresVO.class));
+
+ if(lsPricingVigencia!= null && !lsPricingVigencia.isEmpty()) {
+ for (GP_PricingVigencia pricingVigencia:lsPricingVigencia) {
+ query.setDate("dataInicioPricing", pricingVigencia.getFecinicioventa());
+ query.setDate("dataFimPricing", pricingVigencia.getFecfinventa());
+ }
+ }
+
+ if (classeServicioIds != null && !classeServicioIds.isEmpty()) {
+ query.setParameterList("listClasseServicioId", classeServicioIds);
+ }
+ if(tramoIds != null && !tramoIds.isEmpty()) {
+ query.setParameterList("listTramoId", tramoIds);
+ }
+ if (marcaIds != null && !marcaIds.isEmpty()) {
+ query.setParameterList("listMarcaId", marcaIds);
+ }
+ if (rutaIds != null && !rutaIds.isEmpty()) {
+ query.setParameterList("listRutaId", rutaIds);
+ }
+
+ query.setFetchSize(1000);
+ return query.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingHistoricoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingHistoricoHibernateDAO.java
new file mode 100644
index 000000000..1e1c93dde
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingHistoricoHibernateDAO.java
@@ -0,0 +1,21 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import org.hibernate.SessionFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingHistoricoDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingHistorico;
+
+
+@Repository("gp_pricingHistoricoDAO")
+public class GP_PricingHistoricoHibernateDAO extends GenericHibernateDAO implements GP_PricingHistoricoDAO {
+
+ @Autowired
+ public GP_PricingHistoricoHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+}
+
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingImporteHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingImporteHibernateDAO.java
new file mode 100644
index 000000000..4777fbcc1
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingImporteHibernateDAO.java
@@ -0,0 +1,50 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingImporteDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingImporte;
+import com.rjconsultores.ventaboletos.entidad.Moneda;
+
+@Repository("gp_pricingImporteDAO")
+public class GP_PricingImporteHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingImporteDAO {
+
+ @Autowired
+ public GP_PricingImporteHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public List buscarMoneda(GP_PricingImporte pricingImporte, Moneda moneda) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricingImporte.getPricing()));
+ c.add(Restrictions.eq("moneda", moneda));
+
+ return c.list();
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingMarcaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingMarcaHibernateDAO.java
new file mode 100644
index 000000000..3dc6800ae
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingMarcaHibernateDAO.java
@@ -0,0 +1,54 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingMarcaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingMarca;
+import com.rjconsultores.ventaboletos.entidad.Marca;
+
+@Repository("gp_pricingMarcaDAO")
+public class GP_PricingMarcaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingMarcaDAO {
+
+ @Autowired
+ public GP_PricingMarcaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingMarca(GP_Pricing pricing, Marca marca) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("marca", marca));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingMercadoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingMercadoHibernateDAO.java
new file mode 100644
index 000000000..4a78dd7c1
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingMercadoHibernateDAO.java
@@ -0,0 +1,55 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingMercadoDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingMercado;
+import com.rjconsultores.ventaboletos.entidad.Parada;
+
+@Repository("gp_pricingMercadoDAO")
+public class GP_PricingMercadoHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingMercadoDAO {
+
+ @Autowired
+ public GP_PricingMercadoHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingMercado(GP_Pricing pricing, Parada origen, Parada destino) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("origen", origen));
+ c.add(Restrictions.eq("destino", destino));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingOcupaAntecipaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingOcupaAntecipaHibernateDAO.java
new file mode 100644
index 000000000..1f97bd63f
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingOcupaAntecipaHibernateDAO.java
@@ -0,0 +1,67 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingOcupaAntecipaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingOcupaAntecipa;
+
+@Repository("gp_pricingOcupacionDAO")
+public class GP_PricingOcupaAntecipaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingOcupaAntecipaDAO {
+
+ @Autowired
+ public GP_PricingOcupaAntecipaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ return c.list();
+ }
+
+ @Override
+ public List buscarOcupaAntecipaPricing(Integer pricingId) {
+ return buscarOcupaAntecipaPricing(pricingId, GP_Pricing.ATIVO, GP_Pricing.INATIVO);
+ }
+
+ @Override
+ public List buscarOcupaAntecipaPricingAtivos(Integer pricingId) {
+ return buscarOcupaAntecipaPricing(pricingId, GP_Pricing.ATIVO, null);
+ }
+
+ private List buscarOcupaAntecipaPricing(Integer pricingId, Integer ativo, Integer inativo) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+
+ List pricingStatus = new ArrayList();
+ if(ativo != null) {
+ pricingStatus.add(ativo);
+ }
+ if(inativo != null) {
+ pricingStatus.add(inativo);
+ }
+
+ c.add(Restrictions.in("activo", pricingStatus));
+ c.add(Restrictions.eq("pricing.pricingId", pricingId));
+
+ return c.list();
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingPuntoVentaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingPuntoVentaHibernateDAO.java
new file mode 100644
index 000000000..40a300bc0
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingPuntoVentaHibernateDAO.java
@@ -0,0 +1,54 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingPuntoVentaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingPuntoVenta;
+import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
+
+@Repository("gp_pricingPuntoVentaDAO")
+public class GP_PricingPuntoVentaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingPuntoVentaDAO {
+
+ @Autowired
+ public GP_PricingPuntoVentaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingPuntoVenta(GP_Pricing pricing, PuntoVenta puntoVenta) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("puntoVenta", puntoVenta));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingRutaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingRutaHibernateDAO.java
new file mode 100644
index 000000000..2af54c600
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingRutaHibernateDAO.java
@@ -0,0 +1,54 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingRutaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingRuta;
+import com.rjconsultores.ventaboletos.entidad.Ruta;
+
+@Repository("gp_pricingRutaDAO")
+public class GP_PricingRutaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingRutaDAO {
+
+ @Autowired
+ public GP_PricingRutaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingRuta(GP_Pricing pricing, Ruta ruta) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("ruta", ruta));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingTipoPtoVtaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingTipoPtoVtaHibernateDAO.java
new file mode 100644
index 000000000..03c1598b3
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingTipoPtoVtaHibernateDAO.java
@@ -0,0 +1,54 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingTipoPtoVtaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingTipoPtoVta;
+import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
+
+@Repository("gp_pricingTipoPtoVtaDAO")
+public class GP_PricingTipoPtoVtaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingTipoPtoVtaDAO {
+
+ @Autowired
+ public GP_PricingTipoPtoVtaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingTipoPuntoVenta(GP_Pricing pricing, TipoPuntoVenta tipoPuntoVenta) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("tipoPtovta", tipoPuntoVenta));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingTipoServicioHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingTipoServicioHibernateDAO.java
new file mode 100644
index 000000000..07a98ed14
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingTipoServicioHibernateDAO.java
@@ -0,0 +1,54 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingTipoServicioDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingTipoServicio;
+import com.rjconsultores.ventaboletos.entidad.TipoServicio;
+
+@Repository("gp_pricingTipoServicioDAO")
+public class GP_PricingTipoServicioHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingTipoServicioDAO {
+
+ @Autowired
+ public GP_PricingTipoServicioHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ public Boolean obtenerPricingTipoServicio(GP_Pricing pricing, TipoServicio tipoServicio) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.eq("pricing", pricing));
+ c.add(Restrictions.eq("tipoServicio", tipoServicio));
+
+ if (c.list().size() > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingVigenciaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingVigenciaHibernateDAO.java
new file mode 100644
index 000000000..e6c7b5b7e
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/GP_PricingVigenciaHibernateDAO.java
@@ -0,0 +1,83 @@
+package com.rjconsultores.ventaboletos.dao.hibernate;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import org.hibernate.Criteria;
+import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Repository;
+
+import com.rjconsultores.ventaboletos.dao.GP_PricingVigenciaDAO;
+import com.rjconsultores.ventaboletos.entidad.GP_Pricing;
+import com.rjconsultores.ventaboletos.entidad.GP_PricingVigencia;
+
+@Repository("gp_pricingVigenciaDAO")
+public class GP_PricingVigenciaHibernateDAO extends GenericHibernateDAO
+ implements GP_PricingVigenciaDAO {
+
+ @Autowired
+ public GP_PricingVigenciaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
+ setSessionFactory(factory);
+ }
+
+ @Override
+ public List obtenerTodos() {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ return c.list();
+ }
+
+ @Override
+ public List buscarPorVigencias(GP_PricingVigencia pv) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+
+ c.add(Restrictions.eq("pricing", pv.getPricing()));
+
+ Date fecinicioventa = pv.getFecinicioventa();
+ Date fecfinventa = pv.getFecfinventa();
+
+ c.add(Restrictions.or(Restrictions.between("fecinicioventa", fecinicioventa, fecfinventa),
+ (Restrictions.between("fecfinventa", fecinicioventa, fecfinventa))));
+
+ return c.list();
+ }
+
+ @Override
+ public Boolean podeSalvar(GP_Pricing pricing, GP_PricingVigencia pricingVigencia, Date inicio, Date fim) {
+ Calendar fecInicio = Calendar.getInstance();
+ fecInicio.setTime(inicio);
+ fecInicio.set(Calendar.MILLISECOND, 0);
+ fecInicio.set(Calendar.SECOND, 0);
+
+ Calendar fecFin = Calendar.getInstance();
+ fecFin.setTime(fim);
+ fecFin.set(Calendar.MILLISECOND, 0);
+ fecFin.set(Calendar.SECOND, 0);
+
+ Criteria c = this.getSession().createCriteria(GP_PricingVigencia.class);
+ c.add(Restrictions.eq("activo", GP_Pricing.ATIVO));
+ c.add(Restrictions.ge("fecfinviaje", fecInicio.getTime()));
+ c.add(Restrictions.le("fecinicioviaje", fecFin.getTime()));
+ c.add(Restrictions.eq("pricing", pricing));
+ if (pricingVigencia.getPricingvigenciaId() != null) {
+ c.add(Restrictions.ne("pricingvigenciaId", pricingVigencia.getPricingvigenciaId()));
+ }
+
+ return c.list().isEmpty();
+ }
+
+ @Override
+ public List obtenerTodoPorPricing(GP_Pricing pricing) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("pricing.pricingId", pricing.getPricingId()));
+
+ return c.list();
+ }
+}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/TramoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/TramoHibernateDAO.java
index 9b8d74fd6..a777dacc5 100644
--- a/src/com/rjconsultores/ventaboletos/dao/hibernate/TramoHibernateDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/TramoHibernateDAO.java
@@ -285,4 +285,15 @@ public class TramoHibernateDAO extends GenericHibernateDAO
return query.list();
}
+
+ @Override
+ public List obtenerTramosPorOrigemDestino(Parada origem, Parada destino) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("origem", origem));
+ c.add(Restrictions.eq("destino", destino));
+ c.add(Restrictions.eq("activo", Boolean.TRUE));
+
+
+ return c.list();
+ }
}
diff --git a/src/com/rjconsultores/ventaboletos/entidad/ClaseServicio.java b/src/com/rjconsultores/ventaboletos/entidad/ClaseServicio.java
index d73d487d8..89106c37b 100644
--- a/src/com/rjconsultores/ventaboletos/entidad/ClaseServicio.java
+++ b/src/com/rjconsultores/ventaboletos/entidad/ClaseServicio.java
@@ -292,5 +292,10 @@ public class ClaseServicio implements Serializable, Auditavel {
public void setTipoDescontoMonitrip(TipoClasseServicoBPe tipoClasseServicoBPe) {
this.tipoDescontoMonitrip = tipoClasseServicoBPe;
}
+
+ @Override
+ public Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
\ No newline at end of file
diff --git a/src/com/rjconsultores/ventaboletos/entidad/GP_Pricing.java b/src/com/rjconsultores/ventaboletos/entidad/GP_Pricing.java
new file mode 100644
index 000000000..5296bcb52
--- /dev/null
+++ b/src/com/rjconsultores/ventaboletos/entidad/GP_Pricing.java
@@ -0,0 +1,845 @@
+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;
+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;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+
+@Entity
+@SequenceGenerator(name = "GP_PRICING_SEQ", sequenceName = "GP_PRICING_SEQ", allocationSize = 1)
+@Table(name = "GP_PRICING")
+public class GP_Pricing implements Serializable, Cloneable {
+
+ private static final long serialVersionUID = 1L;
+ public static final Integer ATIVO = 1;
+ public static final Integer INATIVO = 2;
+ public static final Integer EXCLUIDO = 0;
+ @Id
+ @Basic(optional = false)
+ @GeneratedValue(strategy = GenerationType.AUTO, generator = "GP_PRICING_SEQ")
+ @Column(name = "PRICING_ID")
+ private Integer pricingId;
+
+ @Column(name = "NOMBPRICING")
+ private String nombPricing;
+
+ @Column(name = "CANTBOLETO")
+ private Short cantboleto;
+
+ @Column(name = "DESCUENTOPORCENTAJE")
+ private BigDecimal descuentoporcentaje;
+
+ @Column(name = "DESCUENTOPORCREDONDO")
+ private BigDecimal descuentoporcredondo;
+
+ @Column(name = "INDTRANSFERIBLE")
+ private Boolean indtransferible;
+
+ @Column(name = "INDRESERVABLE")
+ private Boolean indreservable;
+
+ @Column(name = "EXIBEVENDA")
+ private Boolean exibeVenda;
+
+ @Column(name = "INDCANCELABLE")
+ private Boolean indcancelable;
+
+ @Column(name = "ACTIVO")
+ private Integer activo;
+
+ @Column(name = "FECMODIF")
+ @Temporal(TemporalType.TIMESTAMP)
+ private Date fecmodif;
+
+ @Column(name = "USUARIO_ID")
+ private Integer usuarioId;
+
+ @Column(name = "CANTDIASANTICIPACION")
+ private Integer cantdiasanticipacion;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingAsientoList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingMercadoList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingMarcaList;
+
+ @JoinColumn(name = "EMPRESA_ID", referencedColumnName = "EMPRESA_ID")
+ @ManyToOne
+ private Empresa empresa;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingRutaList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingDiaList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingImporteList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingTipoptovtaList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingCategoriaList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingVigenciaList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingClaseList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingCorridaList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingPuntoventaList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingTipoServicioList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingOcupaAntecipaList;
+
+ @OneToMany(mappedBy = "pricing", cascade = CascadeType.ALL)
+ private List pricingFormapagoList;
+
+ @Column(name = "INDGENERAFERIADOVIAJE")
+ private String indGeneraFeriadoViaje;
+
+ @Column(name = "INDGENERAFERIADOVENTA")
+ private String indGeneraFeriadoVenta;
+
+ @Column(name = "COLOR")
+ private String color;
+
+ @Column(name = "INDSOBREPOSICAO")
+ private Boolean indSobreposicao;
+
+ @Column(name = "INDGESTAO")
+ private Boolean indGestao;
+
+ @Column(name = "INDAGRUPADODIA")
+ private Boolean indAgrupadoDia;
+
+ @Column(name = "INDAGRUPADOSERVICO")
+ private Boolean indAgrupadoServico;
+
+ @Column(name = "INDESTADIAMINIMA")
+ private Boolean indestadiaminima;
+
+ @Column(name = "CANTDIAS_ESTADIAMINIMA")
+ private Integer cantdiasEstadiaminima;
+
+ @Column(name = "INDLUN_ESTADIAMINIMA")
+ private Boolean indLunEstadiaminima;
+
+ @Column(name = "INDMAR_ESTADIAMINIMA")
+ private Boolean indMarEstadiaminima;
+
+ @Column(name = "INDMIE_ESTADIAMINIMA")
+ private Boolean indMieEstadiaminima;
+
+ @Column(name = "INDJUE_ESTADIAMINIMA")
+ private Boolean indJueEstadiaminima;
+
+ @Column(name = "INDVIE_ESTADIAMINIMA")
+ private Boolean indVieEstadiaminima;
+
+ @Column(name = "INDSAB_ESTADIAMINIMA")
+ private Boolean indSabEstadiaminima;
+
+ @Column(name = "INDDOM_ESTADIAMINIMA")
+ private Boolean indDomEstadiaminima;
+
+ public enum GerarFeriado {
+ // Declaração dos enum
+ GERARSEMPRE("GERAR SEMPRE", "S"),
+
+ GERARQUANDOFERIADO("GERAR SÓ QUANDO FOR FERIADO", "F"),
+
+ GERARQUANDONAOFERIADO("GERAR QUANDO NÃO FOR FERIADO", "N");
+
+ // Definição das constantes
+ public final String valor;
+ public final String descricao;
+
+ public String valor() {
+ return this.valor;
+ }
+
+ public String descricao() {
+ return this.descricao;
+ }
+
+ private GerarFeriado(String descricao, String valor) {
+ this.descricao = descricao;
+ this.valor = valor;
+ }
+ }
+
+ public GP_Pricing() {
+ }
+
+ public GP_Pricing(Integer pricingId) {
+ this.pricingId = pricingId;
+ }
+
+ public Integer getPricingId() {
+ return pricingId;
+ }
+
+ public void setPricingId(Integer pricingId) {
+ this.pricingId = pricingId;
+ }
+
+ public Short getCantboleto() {
+ return cantboleto;
+ }
+
+ public Integer getCantdiasanticipacion() {
+ return cantdiasanticipacion;
+ }
+
+ public void setCantdiasanticipacion(Integer cantdiasanticipacion) {
+ this.cantdiasanticipacion = cantdiasanticipacion;
+ }
+
+ public void setCantboleto(Short cantboleto) {
+ this.cantboleto = cantboleto;
+ }
+
+ public BigDecimal getDescuentoporcentaje() {
+ return descuentoporcentaje;
+ }
+
+ public void setDescuentoporcentaje(BigDecimal descuentoporcentaje) {
+ this.descuentoporcentaje = descuentoporcentaje;
+ }
+
+ public BigDecimal getDescuentoporcredondo() {
+ return descuentoporcredondo;
+ }
+
+ public void setDescuentoporcredondo(BigDecimal descuentoporcredondo) {
+ this.descuentoporcredondo = descuentoporcredondo;
+ }
+
+ public Boolean getIndtransferible() {
+ return indtransferible;
+ }
+
+ public void setIndtransferible(Boolean indtransferible) {
+ this.indtransferible = indtransferible;
+ }
+
+ public Boolean getIndreservable() {
+ return indreservable;
+ }
+
+ public void setIndreservable(Boolean indreservable) {
+ this.indreservable = indreservable;
+ }
+
+ public Boolean getIndcancelable() {
+ return indcancelable;
+ }
+
+ public void setIndcancelable(Boolean indcancelable) {
+ this.indcancelable = indcancelable;
+ }
+
+ public Integer getActivo() {
+ return activo;
+ }
+
+ public void setActivo(Integer activo) {
+ this.activo = activo;
+ }
+
+ public Date getFecmodif() {
+ return fecmodif;
+ }
+
+ public void setFecmodif(Date fecmodif) {
+ this.fecmodif = fecmodif;
+ }
+
+ public Integer getUsuarioId() {
+ return usuarioId;
+ }
+
+ public void setUsuarioId(Integer usuarioId) {
+ this.usuarioId = usuarioId;
+ }
+
+ public List getPricingOcupaAntecipaList() {
+ List poaList = new ArrayList();
+ for (GP_PricingOcupaAntecipa poa : this.pricingOcupaAntecipaList) {
+ if (poa.getActivo() != EXCLUIDO.intValue()) {
+ poaList.add(poa);
+ }
+ }
+ return poaList;
+ }
+
+ public void setPricingOcupaAntecipaList(List pricingOcupaAntecipaList) {
+ this.pricingOcupaAntecipaList = pricingOcupaAntecipaList;
+ }
+
+ public List getPricingAsientoList() {
+ List paList = new ArrayList();
+ for (GP_PricingAsiento pa : this.pricingAsientoList) {
+ if (pa.getActivo() != EXCLUIDO.intValue()) {
+ paList.add(pa);
+ }
+ }
+
+ return paList;
+ }
+
+ public void setPricingAsientoList(List pricingAsientoList) {
+ this.pricingAsientoList = pricingAsientoList;
+ }
+
+ public List getPricingMercadoList() {
+ List pmList = new ArrayList();
+ for (GP_PricingMercado pm : this.pricingMercadoList) {
+ if (pm.getActivo() != EXCLUIDO.intValue()) {
+ pmList.add(pm);
+ }
+ }
+
+ return pmList;
+ }
+
+ public void setPricingMercadoList(List pricingMercadoList) {
+ this.pricingMercadoList = pricingMercadoList;
+ }
+
+ public List getPricingMarcaList() {
+ List pmList = new ArrayList();
+ for (GP_PricingMarca pm : this.pricingMarcaList) {
+ if (pm.getActivo() != EXCLUIDO.intValue()) {
+ pmList.add(pm);
+ }
+ }
+
+ return pmList;
+ }
+
+ public void setPricingMarcaList(List pricingMarcaList) {
+ this.pricingMarcaList = pricingMarcaList;
+ }
+
+ public Empresa getEmpresa() {
+ return empresa;
+ }
+
+ public void setEmpresa(Empresa empresa) {
+ this.empresa = empresa;
+ }
+
+ public List getPricingRutaList() {
+ List prList = new ArrayList();
+ for (GP_PricingRuta pr : this.pricingRutaList) {
+ if (pr.getActivo() != EXCLUIDO.intValue()) {
+ prList.add(pr);
+ }
+ }
+
+ return prList;
+ }
+
+ public void setPricingRutaList(List pricingRutaList) {
+ this.pricingRutaList = pricingRutaList;
+ }
+
+ public List getPricingDiaList() {
+ List pdList = new ArrayList();
+ for (GP_PricingDia pd : this.pricingDiaList) {
+ if (pd.getActivo() != EXCLUIDO.intValue()) {
+ pdList.add(pd);
+ }
+ }
+
+ return pdList;
+ }
+
+ public void setPricingDiaList(List pricingDiaList) {
+ this.pricingDiaList = pricingDiaList;
+ }
+
+ public List getPricingImporteList() {
+ List piList = new ArrayList();
+ for (GP_PricingImporte pi : this.pricingImporteList) {
+ if (pi.getActivo() != EXCLUIDO.intValue()) {
+ piList.add(pi);
+ }
+ }
+
+ return piList;
+ }
+
+ public void setPricingImporteList(List pricingImporteList) {
+ this.pricingImporteList = pricingImporteList;
+ }
+
+ public List getPricingTipoptovtaList() {
+ List ptList = new ArrayList();
+ for (GP_PricingTipoPtoVta pt : this.pricingTipoptovtaList) {
+ if (pt.getActivo() != EXCLUIDO.intValue()) {
+ ptList.add(pt);
+ }
+ }
+
+ return ptList;
+ }
+
+ public void setPricingTipoptovtaList(List pricingTipoptovtaList) {
+ this.pricingTipoptovtaList = pricingTipoptovtaList;
+ }
+
+ public List getPricingCategoriaList() {
+ List pcList = new ArrayList();
+ for (GP_PricingCategoria pc : this.pricingCategoriaList) {
+ if (pc.getActivo() != EXCLUIDO.intValue()) {
+ pcList.add(pc);
+ }
+ }
+
+ return pcList;
+ }
+
+ public void setPricingCategoriaList(List pricingCategoriaList) {
+ this.pricingCategoriaList = pricingCategoriaList;
+ }
+
+ public List getPricingVigenciaList() {
+ List pvList = new ArrayList();
+ if (this.pricingVigenciaList != null) {
+ for (GP_PricingVigencia pv : this.pricingVigenciaList) {
+ if (pv.getActivo() != EXCLUIDO.intValue()) {
+ pvList.add(pv);
+ }
+ }
+ }
+
+ return pvList;
+ }
+
+ public void setPricingVigenciaList(List pricingVigenciaList) {
+ this.pricingVigenciaList = pricingVigenciaList;
+ }
+
+ public List getPricingClaseList() {
+ List pcList = new ArrayList();
+ for (GP_PricingClase pc : this.pricingClaseList) {
+ if (pc.getActivo() != EXCLUIDO.intValue()) {
+ pcList.add(pc);
+ }
+ }
+
+ return pcList;
+ }
+
+ public void setPricingClaseList(List pricingClaseList) {
+ this.pricingClaseList = pricingClaseList;
+ }
+
+ public List getPricingCorridaList() {
+ List pcList = new ArrayList();
+ if (pricingCorridaList == null) {
+ return null;
+ }
+
+ for (GP_PricingCorrida pc : this.pricingCorridaList) {
+ if (pc.getActivo() != EXCLUIDO.intValue()) {
+ pcList.add(pc);
+ }
+ }
+
+ return pcList;
+ }
+
+ public void setPricingCorridaList(List pricingCorridaList) {
+ this.pricingCorridaList = pricingCorridaList;
+ }
+
+ public List getPricingPuntoventaList() {
+ List ppList = new ArrayList();
+ for (GP_PricingPuntoVenta pp : this.pricingPuntoventaList) {
+ if (pp.getActivo() != EXCLUIDO.intValue()) {
+ ppList.add(pp);
+ }
+ }
+
+ return ppList;
+ }
+
+ public void setPricingPuntoventaList(List pricingPuntoventaList) {
+ this.pricingPuntoventaList = pricingPuntoventaList;
+ }
+
+ public List getPricingTipoServicioList() {
+ List ppList = new ArrayList();
+ for (GP_PricingTipoServicio pp : this.pricingTipoServicioList) {
+ if (pp.getActivo() != EXCLUIDO.intValue()) {
+ ppList.add(pp);
+ }
+ }
+
+ return ppList;
+ }
+
+ public void setPricingTipoServicioList(List pricingTipoServicioList) {
+ this.pricingTipoServicioList = pricingTipoServicioList;
+ }
+
+ public List getPricingFormapagoList() {
+ List pfpList = new ArrayList();
+ for (GP_PricingFormapago pfp : this.pricingFormapagoList) {
+ if (pfp.getActivo() != EXCLUIDO.intValue()) {
+ pfpList.add(pfp);
+ }
+ }
+
+ return pfpList;
+ }
+
+ public void setPricingFormapagoList(List pricingFormapagoList) {
+ this.pricingFormapagoList = pricingFormapagoList;
+ }
+
+ public String getIndGeneraFeriadoViaje() {
+ return indGeneraFeriadoViaje;
+ }
+
+ public void setIndGeneraFeriadoViaje(String indGeneraFeriadoViaje) {
+ this.indGeneraFeriadoViaje = indGeneraFeriadoViaje;
+ }
+
+ public String getIndGeneraFeriadoVenta() {
+ return indGeneraFeriadoVenta;
+ }
+
+ public void setIndGeneraFeriadoVenta(String indGeneraFeriadoVenta) {
+ this.indGeneraFeriadoVenta = indGeneraFeriadoVenta;
+ }
+
+ public String getNombPricing() {
+ return nombPricing;
+ }
+
+ public void setNombPricing(String nombPricing) {
+ this.nombPricing = nombPricing;
+ }
+
+ public Boolean getExibeVenda() {
+ return exibeVenda;
+ }
+
+ public void setExibeVenda(Boolean exibeVenda) {
+ this.exibeVenda = exibeVenda;
+ }
+
+ public String getColor() {
+ return color;
+ }
+
+ public void setColor(String color) {
+ this.color = color;
+ }
+
+ public Boolean getIndSobreposicao() {
+ return indSobreposicao;
+ }
+
+ public void setIndSobreposicao(Boolean indSobreposicao) {
+ this.indSobreposicao = indSobreposicao;
+ }
+
+ public Boolean getIndGestao() {
+ return indGestao;
+ }
+
+ public void setIndGestao(Boolean indGestao) {
+ this.indGestao = indGestao;
+ }
+
+ public Boolean getIndAgrupadoDia() {
+ return indAgrupadoDia;
+ }
+
+ public void setIndAgrupadoDia(Boolean indAgrupadoDia) {
+ this.indAgrupadoDia = indAgrupadoDia;
+ }
+
+ public Boolean getIndAgrupadoServico() {
+ return indAgrupadoServico;
+ }
+
+ public void setIndAgrupadoServico(Boolean indAgrupadoServico) {
+ this.indAgrupadoServico = indAgrupadoServico;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 0;
+ hash += (pricingId != null ? pricingId.hashCode() : 0);
+ return hash;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (!(object instanceof GP_Pricing)) {
+ return false;
+ }
+ GP_Pricing other = (GP_Pricing) object;
+ if ((this.pricingId == null && other.pricingId != null) || (this.pricingId != null && !this.pricingId.equals(other.pricingId))) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "[ Id=" + pricingId + ", nome=" + nombPricing + "]";
+ }
+
+ public Boolean getIndestadiaminima() {
+ return indestadiaminima;
+ }
+
+ public void setIndestadiaminima(Boolean indestadiaminima) {
+ this.indestadiaminima = indestadiaminima;
+ }
+
+ public Integer getCantdiasEstadiaminima() {
+ return cantdiasEstadiaminima;
+ }
+
+ public void setCantdiasEstadiaminima(Integer cantdiasEstadiaminima) {
+ this.cantdiasEstadiaminima = cantdiasEstadiaminima;
+ }
+
+ public Boolean getIndLunEstadiaminima() {
+ return indLunEstadiaminima;
+ }
+
+ public void setIndLunEstadiaminima(Boolean indLunEstadiaminima) {
+ this.indLunEstadiaminima = indLunEstadiaminima;
+ }
+
+ public Boolean getIndMarEstadiaminima() {
+ return indMarEstadiaminima;
+ }
+
+ public void setIndMarEstadiaminima(Boolean indMarEstadiaminima) {
+ this.indMarEstadiaminima = indMarEstadiaminima;
+ }
+
+ public Boolean getIndMieEstadiaminima() {
+ return indMieEstadiaminima;
+ }
+
+ public void setIndMieEstadiaminima(Boolean indMieEstadiaminima) {
+ this.indMieEstadiaminima = indMieEstadiaminima;
+ }
+
+ public Boolean getIndJueEstadiaminima() {
+ return indJueEstadiaminima;
+ }
+
+ public void setIndJueEstadiaminima(Boolean indJueEstadiaminima) {
+ this.indJueEstadiaminima = indJueEstadiaminima;
+ }
+
+ public Boolean getIndVieEstadiaminima() {
+ return indVieEstadiaminima;
+ }
+
+ public void setIndVieEstadiaminima(Boolean indVieEstadiaminima) {
+ this.indVieEstadiaminima = indVieEstadiaminima;
+ }
+
+ public Boolean getIndSabEstadiaminima() {
+ return indSabEstadiaminima;
+ }
+
+ public void setIndSabEstadiaminima(Boolean indSabEstadiaminima) {
+ this.indSabEstadiaminima = indSabEstadiaminima;
+ }
+
+ public Boolean getIndDomEstadiaminima() {
+ return indDomEstadiaminima;
+ }
+
+ public void setIndDomEstadiaminima(Boolean indDomEstadiaminima) {
+ this.indDomEstadiaminima = indDomEstadiaminima;
+ }
+
+ public GP_Pricing clonar() throws CloneNotSupportedException {
+ GP_Pricing novo = new GP_Pricing();
+
+ novo = (GP_Pricing) super.clone();
+
+ novo.setEmpresa((Empresa) empresa.getCloneObject());
+
+ List auxGP_PricingAsientoList = new ArrayList();
+ for (GP_PricingAsiento aux : pricingAsientoList) {
+
+ GP_PricingAsiento obj = (GP_PricingAsiento) aux.clone();
+
+ auxGP_PricingAsientoList.add(obj);
+ }
+ novo.setPricingAsientoList(auxGP_PricingAsientoList);
+
+ List auxGP_PricingCategoriaList = new ArrayList();
+ for (GP_PricingCategoria aux : pricingCategoriaList) {
+
+ GP_PricingCategoria obj = (GP_PricingCategoria) aux.clone();
+
+ auxGP_PricingCategoriaList.add(obj);
+ }
+ novo.setPricingCategoriaList(auxGP_PricingCategoriaList);
+
+ List auxGP_PricingClaseList = new ArrayList();
+ for (GP_PricingClase aux : pricingClaseList) {
+
+ GP_PricingClase obj = (GP_PricingClase) aux.clone();
+
+ auxGP_PricingClaseList.add(obj);
+ }
+ novo.setPricingClaseList(auxGP_PricingClaseList);
+
+ List auxGP_PricingCorridaList = new ArrayList();
+ for (GP_PricingCorrida aux : pricingCorridaList) {
+
+ GP_PricingCorrida obj = (GP_PricingCorrida) aux.clone();
+
+ auxGP_PricingCorridaList.add(obj);
+ }
+ novo.setPricingCorridaList(auxGP_PricingCorridaList);
+
+ List auxGP_PricingDiaList = new ArrayList();
+ for (GP_PricingDia aux : pricingDiaList) {
+
+ GP_PricingDia obj = (GP_PricingDia) aux.clone();
+
+ auxGP_PricingDiaList.add(obj);
+ }
+ novo.setPricingDiaList(auxGP_PricingDiaList);
+
+ List auxGP_PricingFormapagoList = new ArrayList();
+ for (GP_PricingFormapago aux : pricingFormapagoList) {
+
+ GP_PricingFormapago obj = (GP_PricingFormapago) aux.clone();
+
+ auxGP_PricingFormapagoList.add(obj);
+ }
+ novo.setPricingFormapagoList(auxGP_PricingFormapagoList);
+
+ List auxGP_PricingImporteList = new ArrayList();
+ for (GP_PricingImporte aux : pricingImporteList) {
+
+ GP_PricingImporte obj = (GP_PricingImporte) aux.clone();
+
+ auxGP_PricingImporteList.add(obj);
+ }
+ novo.setPricingImporteList(auxGP_PricingImporteList);
+
+ List auxGP_PricingMarcaList = new ArrayList();
+ for (GP_PricingMarca aux : pricingMarcaList) {
+
+ GP_PricingMarca obj = (GP_PricingMarca) aux.clone();
+
+ auxGP_PricingMarcaList.add(obj);
+ }
+ novo.setPricingMarcaList(auxGP_PricingMarcaList);
+
+ List auxGP_PricingMercadoList = new ArrayList