Announcement Announcement Module
Collapse
No announcement yet.
ResultSet automatic mapping to JavaBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ResultSet automatic mapping to JavaBean

    Hi All,

    Is there something in Spring which can map a ResultSet to a JavaBean directly?

    What I'm looking for is somethis similar to the BeanHandler present in Apache Commons DBUtils.

    Thanks,
    Daniel

  • #2
    Hello,

    not sure what you need exactly.

    But if you want to map the rows yourself in one place, have a look here

    Hope this helps
    regards
    agim

    Comment


    • #3
      Hi!

      I wanna cols to be automatically mapped to bean properties. I'm achieving this using apache commons dbutils inside spring rowmapper, like this:

      return getJdbcTemplate().query(getQuery(),
      new Object[] { nmLogin, nmLogin }, new RowMapper() {
      public Object mapRow(ResultSet rs, int i)
      throws SQLException {

      return beanHandler.handle(rs);
      }
      });

      Thanks,
      Daniel

      Comment


      • #4
        Does this help?
        http://forum.springframework.org/showthread.php?t=32160
        Last edited by karldmoore; Aug 29th, 2007, 12:54 PM.

        Comment

        Working...
        X