|
From: Thomas R. <tho...@tr...> - 2005-09-08 03:31:54
|
I added support for named parameters some days ago. Here is an example:
public List getPreferredBeer() {
Map params = new HashMap(2);
params.put("unwantedBrand", "Heineken");
params.put("maxPrice", new BigDecimal(25.00));
List l = getJdbcTemplate().queryForList(
"select id, price, brand from beers " +
"where price < :maxPrice and brand <> :unwantedBrand",
params);
return l;
}
I put together a PDF document that highlights additional usage -
http://www.springdeveloper.com/documents/spring-1_3-jdbc-example.pdf
Take a recent snapshot for a spin and let me know if something is
missing or not working. I'm still working on adding some additional
tests.
Thomas
|