Announcement Announcement Module
Collapse
No announcement yet.
JdbcTemplate - Best way to fill up Business VALUE OBJECT Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JdbcTemplate - Best way to fill up Business VALUE OBJECT

    Hello All,
    Can anyone tell me the best way to get the data and fill up my Business Value objects using JdbcTemplate

    Method i am following is.
    1. Wire and get the handle to JdbcTemplate
    2. use
    this.jdbcTemplate.query(queryBuffer.toString(), bindingValues, new RowMapperImplementedClass());
    3. RowMapperImplementedClass implements RowMapper
    4. This class will implement mapRow method

    IS THERE ANY BETTER WAY OF DOING THIS.. My requirement is
    1. Use JdbcTemplate
    2. Keep the query outside in a xml
    3. Dont have to code for setting values back in VO....

    I am very new to the Spring/Hibernate world..
    Please help...
    thanks in advance
    - Prasad -

  • #2
    Have you had a look at this?
    http://forum.springframework.org/showthread.php?t=32160

    Comment


    • #3
      Hello Karl,
      Thanks for quick turn around.
      Well, I did take a look at that.

      Is that class already included in the realease 2.0.6? If not then should take the source of the same and include the same in my code?

      Comment


      • #4
        Not in my 2.0.6 version .

        You could always grap the code mentioned in the other thread and use it in your own project.

        Comment


        • #5
          Hey,
          Thanks once again.
          I can do that but do you see any reason as to why it has not been included in the main stream build

          Comment


          • #6
            The main stream build contains only bugfixes (2.0.x) new functionality is mainly going into 2.1. I haven't checked the newest milestone/nightly of 2.1 but you might find it in there. Most of the time the milestone release are very good and are quite usable.

            Comment


            • #7
              Ok. Thanks... I am picking up Revision 1.4. Is that rite?

              Comment

              Working...
              X