hi
i put my query in a xml file
is there a way to set the properties value of a bean to the value of qryUser?Code:<queries> <query name="qryUser"> select * from user </query> </queries>
or are there any better pratice?
thanks
hi
i put my query in a xml file
is there a way to set the properties value of a bean to the value of qryUser?Code:<queries> <query name="qryUser"> select * from user </query> </queries>
or are there any better pratice?
thanks
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