Slide 15
Slide 15 text
Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
15
Lambdas with Spring's JdbcTemplate (v1)
JdbcTemplate jt = new JdbcTemplate(dataSource);
jt.query("SELECT name, age FROM person WHERE dep = ?",
ps -> ps.setString(1, "Sales"),
(rs, rowNum) -> new Person(rs.getString(1), rs.getInt(2)));