Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. final Object o1 = jdbcOperations.query("SELECT book_id, series_id, pos FROM book_series", new RowMapper<Object>() {
  2. @Override
  3. public Object mapRow(ResultSet rs, int i) throws SQLException {
  4. final Map<String, Object> result = new HashMap<String, Object>();
  5. result.put("book_id", rs.getLong("book_id"));
  6. result.put("series_id", rs.getLong("series_id"));
  7. result.put("pos", rs.getInt("pos"));
  8. return result;
  9. }
  10. });
  11. final Object o2 = jdbcOperations.query("SELECT book_id, external_id_type, external_id FROM book_external_id", new RowMapper<Object>() {
  12. @Override
  13. public Object mapRow(ResultSet rs, int i) throws SQLException {
  14. final Map<String, Object> result = new HashMap<>();
  15. result.put("book_id", rs.getLong("book_id"));
  16. result.put("external_id_type", rs.getLong("external_id_type"));
  17. result.put("external_id", rs.getString("external_id"));
  18. return result;
  19. }
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement