fixes bug#15126
dev: Lucas Silvério qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@96557 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6d073e519a
commit
826b3f20dc
|
@ -920,6 +920,7 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
|||
con = getConnection();
|
||||
npst = new NamedParameterStatement(con, sQuery.toString());
|
||||
setParametros(npst, parametros);
|
||||
npst.setFetchSize(100);
|
||||
rSet = npst.executeQuery();
|
||||
|
||||
List<BoletoComissao> lsBoletoComissao = new ArrayList<BoletoComissao>();
|
||||
|
|
|
@ -16,11 +16,13 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public class NamedParameterStatement {
|
||||
/** The statement this object is wrapping. */
|
||||
private final PreparedStatement statement;
|
||||
|
||||
/** Maps parameter names to arrays of ints which are the parameter indices. */
|
||||
|
||||
private final Map indexMap;
|
||||
|
||||
/**
|
||||
|
@ -51,6 +53,7 @@ public class NamedParameterStatement {
|
|||
indexMap = new HashMap();
|
||||
String parsedQuery = parse(query, indexMap);
|
||||
statement = connection.prepareStatement(parsedQuery, resultSetType, ResultSet.CONCUR_READ_ONLY);
|
||||
statement.setFetchSize(1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -325,6 +328,10 @@ public class NamedParameterStatement {
|
|||
return statement.isClosed();
|
||||
}
|
||||
|
||||
public void setFetchSize(int rows) throws SQLException {
|
||||
statement.setFetchSize(rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the current set of parameters as a batch entry.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue