This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about template.queryForList