Created
April 11, 2015 21:51
-
-
Save avshabanov/d27f329f3e6d98dce40f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Object o1 = jdbcOperations.query("SELECT book_id, series_id, pos FROM book_series", new RowMapper<Object>() { | |
@Override | |
public Object mapRow(ResultSet rs, int i) throws SQLException { | |
final Map<String, Object> result = new HashMap<String, Object>(); | |
result.put("book_id", rs.getLong("book_id")); | |
result.put("series_id", rs.getLong("series_id")); | |
result.put("pos", rs.getInt("pos")); | |
return result; | |
} | |
}); | |
final Object o2 = jdbcOperations.query("SELECT book_id, external_id_type, external_id FROM book_external_id", new RowMapper<Object>() { | |
@Override | |
public Object mapRow(ResultSet rs, int i) throws SQLException { | |
final Map<String, Object> result = new HashMap<>(); | |
result.put("book_id", rs.getLong("book_id")); | |
result.put("external_id_type", rs.getLong("external_id_type")); | |
result.put("external_id", rs.getString("external_id")); | |
return result; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment