jodd-db/src/main/java/jodd/db/DbQueryBase.java
public <T> List<T> list(final QueryMapper<T> queryMapper) {
		final ResultSet resultSet = execute();

		final List<T> list = new ArrayList<>();

		try {
			while (resultSet.next()) {
				final T t = queryMapper.process(resultSet);
				if (t == null) {
					break;
				}
				list.add(t);
			}
		} catch (SQLException sex) {
			throw new DbSqlException(sex);
		} finally {
			DbUtil.close(resultSet);
		}

		return list;
	}
public <T> List<T> list(final QueryMapper<T> queryMapper) {
		final ResultSet resultSet = execute();

		final List<T> list = new ArrayList<>();

		try {
			while (resultSet.next()) {
				final T t = queryMapper.process(resultSet);
				if (t == null) {
					break;
				}
				list.add(t);
			}
		} catch (SQLException sex) {
			throw new DbSqlException(sex);
		} finally {
			DbUtil.close(resultSet);
		}

		return list;
	}
{@link #execute() Executes} the query, iterates result set and
{@link QueryMapper maps} each row.