The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Spring Note: RowMapper/MappingSqlQuery

0 replies.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a flat view of this topic  Flat View
Previous Topic   Next Topic
Threaded View: This topic has 0 replies on 1 page
Ryan Ransford

Posts: 71
Nickname: rdransfo
Registered: Jul, 2008

Ryan Ransford is a Java developer working in the enterprise looking to make the world a better place
Spring Note: RowMapper/MappingSqlQuery Posted: Jan 21, 2011 10:51 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Ryan Ransford.
Original Post: Spring Note: RowMapper/MappingSqlQuery
Feed Title: Active-Active Configuration
Feed URL: http://active-active.blogspot.com/feeds/posts/default
Feed Description: Active-Active Configuration is a blog about making my place in the enterprise world better. This blog is primarily focused on Java articles, but be prepared to be challenged by posts about dynamic languages, agile tools, and the lighter side of geek culture.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Ryan Ransford
Latest Posts From Active-Active Configuration

RowMapper

The RowMapper class is an interface which defines only one method which turns a single row from a ResultSet into a domain-useable object. While you can use a generic implementation of this class for producing column name/value Maps, my typical usage has been to create domain objects from the result of a specific set of queries.

MappingSqlQuery

The MappingSqlQuery class is intended to be used for SELECT queries and can use a RowMapper implementation to create a result List of the appropriate type, hiding the intermediate ResultSet from the outside world.

These classes, when taken together, provide excellent tools for creating the read methods for DAO classes which are concise and testable.

ITSpringJdbc.java

ITSpringJdbc-context.xml

select dummy from table where dummy = ? ]]>

Read: Spring Note: RowMapper/MappingSqlQuery


Topic: Cindy is doing the Avon Walk for Breast Cancer Previous Topic   Next Topic Topic: Bliki: CraftmanshipAndTheCrevasse

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use