From ca0aafe7b501b035bfde784f49f59d428ba978b8 Mon Sep 17 00:00:00 2001 From: car031 Date: Wed, 20 Nov 2024 17:44:19 +0100 Subject: [PATCH] simple rename --- .../com/logicaldoc/core/HibernatePersistentObjectDAO.java | 4 ++-- .../java/com/logicaldoc/core/PersistentObjectDAO.java | 2 +- .../core/{ResultSetWorker.java => ResultSetWalker.java} | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) rename logicaldoc-core/src/main/java/com/logicaldoc/core/{ResultSetWorker.java => ResultSetWalker.java} (53%) diff --git a/logicaldoc-core/src/main/java/com/logicaldoc/core/HibernatePersistentObjectDAO.java b/logicaldoc-core/src/main/java/com/logicaldoc/core/HibernatePersistentObjectDAO.java index f7463d7b0..3525b85aa 100644 --- a/logicaldoc-core/src/main/java/com/logicaldoc/core/HibernatePersistentObjectDAO.java +++ b/logicaldoc-core/src/main/java/com/logicaldoc/core/HibernatePersistentObjectDAO.java @@ -426,13 +426,13 @@ private void processQueryForListRecord(ResultSet resultSet, List results, } @Override - public void queryForResultSet(String sql, Map parameters, Integer maxRows, ResultSetWorker worker) + public void queryForResultSet(String sql, Map 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) diff --git a/logicaldoc-core/src/main/java/com/logicaldoc/core/PersistentObjectDAO.java b/logicaldoc-core/src/main/java/com/logicaldoc/core/PersistentObjectDAO.java index 061d87df6..e8798329b 100644 --- a/logicaldoc-core/src/main/java/com/logicaldoc/core/PersistentObjectDAO.java +++ b/logicaldoc-core/src/main/java/com/logicaldoc/core/PersistentObjectDAO.java @@ -257,7 +257,7 @@ public

List

query(String sql, Map parameters, RowMapper

parameters, Integer maxRows, ResultSetWorker worker) + public void queryForResultSet(String sql, Map parameters, Integer maxRows, ResultSetWalker worker) throws PersistenceException; /** diff --git a/logicaldoc-core/src/main/java/com/logicaldoc/core/ResultSetWorker.java b/logicaldoc-core/src/main/java/com/logicaldoc/core/ResultSetWalker.java similarity index 53% rename from logicaldoc-core/src/main/java/com/logicaldoc/core/ResultSetWorker.java rename to logicaldoc-core/src/main/java/com/logicaldoc/core/ResultSetWalker.java index 116b549a6..c1682222c 100644 --- a/logicaldoc-core/src/main/java/com/logicaldoc/core/ResultSetWorker.java +++ b/logicaldoc-core/src/main/java/com/logicaldoc/core/ResultSetWalker.java @@ -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; }