Announcement Announcement Module
Collapse
No announcement yet.
JDBCTemplate Question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JDBCTemplate Question

    Hello,

    I am wondering if there is something similar to HibernateDaoSupport for JdbcTemplate? If such a support class exists then I could just add a getter/setter method to any class needing to execute raw sql much the way I have a getter/setter for hibernateTemplate in my DAO implementation classes that has the save,update,delete methods on it.

    Then I could create xml stanza like:

    <bean id="jdbcTemplate" class="org.springframework.orm.hibernate.JdbcTempl ate">
    <property name="dataSource"><ref local="myDataSource"/>
    </property>
    </bean>

    <bean id="queryBean" class="org.simple.fooQueryBean" singleton="false">
    <property name="jdbcTemplate"><ref bean="jdbcTemplate"/></property>
    </bean>

    and my bean would implement xxxJdbcSupport and have getter/setter IOC create the JdbcTemplate instance for me.

    Am I way off the mark? Is this functionality already available I just don't know it???

    Thanks!

  • #2
    Re: JDBCTemplate Question

    Originally posted by eusdart
    I am wondering if there is something similar to HibernateDaoSupport for JdbcTemplate?
    Umm... JdbcDaoSupport.

    Comment


    • #3
      Aha! thought there would be something similar.


      Thanks!

      Comment

      Working...
      X