Skip to content

Commit

Permalink
simple rename
Browse files Browse the repository at this point in the history
  • Loading branch information
car031 committed Nov 20, 2024
1 parent 926cc92 commit ca0aafe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,13 @@ private <R> void processQueryForListRecord(ResultSet resultSet, List<R> results,
}

@Override
public void queryForResultSet(String sql, Map<String, Object> parameters, Integer maxRows, ResultSetWorker worker)
public void queryForResultSet(String sql, Map<String, Object> parameters, Integer maxRows, ResultSetWalker walker)
throws PersistenceException {
getCurrentSession().doWork(connection -> {
try (NamedParameterStatement stmt = new NamedParameterStatement(connection, sql, parameters, maxRows);
ResultSet rs = stmt.executeQuery();) {
logStatement(sql, connection);
worker.work(rs);
walker.walk(rs);
} catch (Exception e) {
log.error(e.getMessage(), e);
if (e instanceof PersistenceException pe)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public <P> List<P> query(String sql, Map<String, Object> parameters, RowMapper<P
*
* @throws PersistenceException raised in case of errors in the database
*/
public void queryForResultSet(String sql, Map<String, Object> parameters, Integer maxRows, ResultSetWorker worker)
public void queryForResultSet(String sql, Map<String, Object> parameters, Integer maxRows, ResultSetWalker worker)
throws PersistenceException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
import java.sql.SQLException;

/**
* A worker that operates in a result set bound to the current JDBC connection
* A walker that operates over a {@link ResultSet} bound to the current JDBC connection
*
* @author Marco Meschieri - LogicalDOC
* @since 9.0.1
*/
public interface ResultSetWorker {
public interface ResultSetWalker {

/**
* Implement in this method your iteration logic
*
* @param rows The result set ready to be used
* @param rows The {@link ResultSet} ready to be iterated
*
* @throws SQLException Error in the database
*/
public void work(ResultSet rows) throws SQLException;
public void walk(ResultSet rows) throws SQLException;
}

0 comments on commit ca0aafe

Please sign in to comment.