This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Question about template.queryForList
 
Similar Threads
display a dynamic search page
data lost from JSP back to same Action (struts 2)
How to receive json data in request
handling zero records found
what if no ID column in the table for Hibernate?