List of usage examples for org.apache.commons.dbutils BasicRowProcessor toMap
@Override public Map<String, Object> toMap(ResultSet rs) throws SQLException
ResultSet
row into a Map
. From source file:com.splicemachine.homeless.TestUtils.java
public static List<Map> resultSetToMaps(ResultSet rs) throws SQLException { List<Map> results = new ArrayList<>(); BasicRowProcessor brp = new BasicRowProcessor(); while (rs.next()) { results.add(brp.toMap(rs)); }/*www.j av a2s . c o m*/ return results; }
From source file:com.mirth.connect.connectors.jdbc.DatabaseReceiver.java
/** * For each record in the given ResultSet, convert it to XML and dispatch it as a raw message to * the channel. Then run the post-process if applicable. *//*from ww w .j a v a 2 s . co m*/ @SuppressWarnings("unchecked") private void processResultSet(ResultSet resultSet) throws SQLException, InterruptedException, DatabaseReceiverException { BasicRowProcessor basicRowProcessor = new BasicRowProcessor(); // loop through the ResultSet rows and convert them into hash maps for processing while (resultSet.next()) { if (isTerminated()) { return; } processRecord((Map<String, Object>) basicRowProcessor.toMap(resultSet)); } }