geeky · java

Spring row mapper

A coworker and I were chatting regarding spring rowMappers and I did a little more research and found the following:

Spring’s simpleJdbcTemplate deprecated methods with parameterizedRowMapper in spring 3. The class ParameterizedRowMapper is not deprecated.

Spring’s jdbcTemplate however only has methods that take RowMapper<T> so it will continue to work with parameterizedRowMapper.

But it seems to me the direction of Spring is to go back to use genericized rowMapper e.g. RowMapper<T>. So for all of my new mappers, I will probably implement RowMapper<T> instead of ParameterizedRowMapper<T>.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s