code: public List<Map<String,Object>> resultSetToMap(ResultSet rows) {
          try {
              List<Map<String,Object>> beans = new ArrayList<Map<String,Object>>();
              int columnCount = rows.getMetaData().getColumnCount();
              while (rows.next()) {
                  LinkedHashMap<String,Object> bean = new LinkedHashMap<String, Object>();
                  beans.add(bean);
                  for (int i = 0; i < columnCount; i++) {
                      Object object = rows.getObject(i + 1);
                      String columnLabel = rows.getMetaData().getColumnLabel(i + 1);
                      String columnName = rows.getMetaData().getColumnName(i + 1);
                      bean.put(StringUtils.defaultIfEmpty(columnLabel, columnName), object != null ? object.toString() : "");
                  }
              }
              return beans;
          } catch (Exception ex) {
              errors.add(ex.getMessage());
              throw new RuntimeException(ex);
          }
      }
docs: Returns a preparedStatement result into a List of Maps. Not the most efficient way of storing the values, however
  the results should be limited at this stage.
  @param rows The result set.
  @return Mapped results.
  @throws RuntimeException upon any error, adds values to "errors"