spring's JdbcTemplate has a nice query pattern that gets rid of a lot of boilerplate by passing each fetched row to a lambda