File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Question about template.queryForList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Question about template.queryForList" Watch "Question about template.queryForList" New topic
Author

Question about template.queryForList

Higgledy Smith
Ranch Hand

Joined: Mar 07, 2006
Posts: 192
I am learning Spring and really not seeing the whole picture with jdbctemplate.

Here is my code, which does work:



Where I am stuck is how to test the result that comes back. With the debugger, I can see the results I just don't know how to setup to test for the results.

I have attached the result from the debugger. From what I see, the result object is a list of maps.

Thank you.

Higgledy





[Thumbnail for results.png]

Higgledy Smith
Ranch Hand

Joined: Mar 07, 2006
Posts: 192
The API for SimpleJdbcTemplate, shows that the method, queryForList, returns List<Map><String,Object>>.

How do I interept List<Map><String,Object>> ? Is the return a List of Maps with a String for the Key to the Object?

Thank you
Higgledy
 
 
subject: Question about template.queryForList