|
From: Rod J. <ro...@in...> - 2004-10-19 18:10:33
|
You're meant to subclass SqlQuery to add strongly typed methods with meaningful names. E.g. findAllSomethingOrOthers(int, String) would invoke the generically typed execute() method in the superclass. David Smiley wrote: > Hello... I hope it's appropriate to post my comment to this list since > it's not a usage assistance issue (in which case I'd be sending this to > the user list). > > I just started working on project here that uses Spring jdbc.core's > JdbcTemplate & the gang in that package. When I discovered the higher > order abstractions in jdbc.object, it seemed to me that we should use > those facilities. The lead developer of the project told me that he > deliberately avoided it because he thought the *untyped* Object[] array > to parameterize a query as found in SqlQuery.execute() was a very poor > design choice. He preferred the interface and use of > PreparedStatementSetter as used within jdbc.core. I tend to agree but I > still want to use the package anyway. I do see the declareParameter() > and setTypes() methods of RdbmsOperation but this just separates the > type determination from specifying the parameter values when it could be > done at once (again, as with PreparedStatementSetter). Can the rationale > between the Object[] parameterization in jdbc.object be explained, and > perhaps could jdbc.object be reworked in the future to handle a > PreparedStatementSetter or some similar typed parameter strategy? > > Thanks. > > ~ David Smiley > MITRE > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > -- ____________________________________________________ Rod Johnson Interface21 - Spring Services from the Source http://www.springframework.com Founder, Spring Framework: http://www.springframework.org Author, "Expert One-on-One J2EE Development Without EJB" (May 2004, with Juergen Hoeller). http://www.amazon.com/exec/obidos/ASIN/0764558315/ Author, "Expert One-on-One J2EE Design and Development" (October 2002). http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/ ____________________________________________________ Interface21 Limited Registered Office Summit House, 2-2a Highfield Road, Dartford, Kent DA1 2JY Registered in England and Wales No. 5187766 ____________________________________________________ |