diff --git a/src/com/rjconsultores/ventaboletos/constantes/ConstantesFuncionSistema.java b/src/com/rjconsultores/ventaboletos/constantes/ConstantesFuncionSistema.java index a99cf1eb1..1640a13c6 100644 --- a/src/com/rjconsultores/ventaboletos/constantes/ConstantesFuncionSistema.java +++ b/src/com/rjconsultores/ventaboletos/constantes/ConstantesFuncionSistema.java @@ -14,6 +14,7 @@ public class ConstantesFuncionSistema { public static final String CLAVE_EDITAR_ALTERA_EXIBECANCEL = "COM.RJCONSULTORES.ADMINISTRACION.GUI.CONFIGURACIONECCOMERCIALES.MOTIVOCANCELACION.ALTERAEXIBECANCEL"; public static final String CLAVE_CALCULODIARIOCOMISSAO_AUTORIZACAOCALCULOTODASAGENCIAS = "COM.RJCONSULTORES.ADM.CALCULODIARIOCOMISSAO.AUTORIZACAOCALCULOTODASAGENCIAS"; public static final String CLAVE_HISTORICO_COMPRAS = "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOHISTORICOCOMPRAS"; + public static final String CLAVE_EXPORTACAO_SGTI = "COM.RJCONSULTORES.ADMINISTRACION.GUI.ANALITICO.SGTI"; diff --git a/src/com/rjconsultores/ventaboletos/web/utilerias/NamedParameterStatement.java b/src/com/rjconsultores/ventaboletos/web/utilerias/NamedParameterStatement.java index d56045758..f34514854 100644 --- a/src/com/rjconsultores/ventaboletos/web/utilerias/NamedParameterStatement.java +++ b/src/com/rjconsultores/ventaboletos/web/utilerias/NamedParameterStatement.java @@ -4,12 +4,12 @@ package com.rjconsultores.ventaboletos.web.utilerias; import java.sql.Connection; +import java.sql.Date; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; -import java.sql.Date; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; @@ -35,9 +35,22 @@ public class NamedParameterStatement { */ public NamedParameterStatement(Connection connection, String query) throws SQLException { + this(connection, query, ResultSet.TYPE_FORWARD_ONLY); + } + + /** + * Creates a NamedParameterStatement. Wraps a call to c.{@link Connection#prepareStatement(java.lang.String) prepareStatement}. + * + * @param connection the database connection + * @param query the parameterized query + * @throws SQLException if the statement could not be created + * @param resultSetType type of resultSet + */ + public NamedParameterStatement(Connection connection, String query, int resultSetType) throws + SQLException { indexMap = new HashMap(); String parsedQuery = parse(query, indexMap); - statement = connection.prepareStatement(parsedQuery); + statement = connection.prepareStatement(parsedQuery, resultSetType, ResultSet.CONCUR_READ_ONLY); } /**