Announcement Announcement Module
Collapse
No announcement yet.
query in xml file Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • query in xml file

    hi

    i put my query in a xml file
    Code:
    <queries>
    <query name="qryUser">
    select * from user
    </query>
    </queries>
    is there a way to set the properties value of a bean to the value of qryUser?

    or are there any better pratice?

    thanks

  • #2
    You might want to consider using Apache iBATIS with Spring (Spring offers support for this with SqlMapClientTemplate, etc. - see the org.springframework.orm.ibatis package.

    iBATIS gives you the functionality you're looking for (storing queries in XML and mapping results to bean properties), plus a whole bunch more. Also, it's really not difficult to learn (compared to something like Hibernate, which is a bit more complex). Grab some coffee and read through the documentation: http://ibatis.apache.org/javadownloads.cgi

    Comment

    Working...
    X