|
From: <jue...@we...> - 2003-07-23 16:13:49
|
Thomas, You're right, there's an issue with mapRow(ResultSet rs, int rowNum) = having to be abstract. On the contrary, SimpleFormController has a = default implementation of its last onSubmit method. So let's scrap that = merging idea. Let me refine your proposal a bit. We would need "Map context" on = MappingSqlQueryWithParameters too, to be able to cascade down to the = simpler mapRow methods. But why not avoid MappingSqlQueryWithContext in = the first place and just add "Map context" to = MappingSqlQueryWithParameters? MappingSqlQueryWithParameters abstract Object mapRow(ResultSet rs, int rowNum, Object[] parameters, = Map context) MappingSqlQuery abstract Object mapRow(ResultSet rs, int rowNum) Whoever wants to use the context map will probably not mind the = parameters even if they are not needed. Of course, existing custom = subclasses of MappingSqlQueryWithParameters would still need to be = changed then. But I don't consider that a problem, as I assume that most = users use MappingSqlQuery anyway, and as migration is straightforward. Jean-Pierre, if we agree on the above, could you make the introduction = of the context map and migrate your current application to it? I'd like = to have an actual usage of this feature before we finalize it. Thomas, = you're invited to review this stuff, of course! Juergen P.S.: I wonder about finding the time myself every single day ;-) Seriously, = I've reduced my working time at werk3AT from 40 to 30 hours per week, = starting with May - to be able to put more effort into Spring = development, evangelizing, and writing about it. -----Original Message----- From: tri...@tr... [mailto:tri...@tr...] Sent: Wednesday, July 23, 2003 3:50 PM To: j=FCrgen h=F6ller [werk3AT] Cc: jp....@ti...; springframework-developer Subject: Re: [Springframework-developer] Summary of pending points Juergen, Jean-Pierre, > I suggest to address the issue by offering overloaded execute and = mapRow > methods with a "Map context" parameter (instead of "Object context"). > Additionally, I suggest to offer just one single MappingSqlQuery class = with 3 > mapRow hooks: >=20 I think I'm finally starting to see the value in providing a context for = the mapping class. Thanks for not giving up on this Jean-Pierre. I'm not sure about merging the different classes since there is one = specific method in each implementation that is marked as abstract. This will = force the user to implement the needed mapping method. If you merge them this = would not be possible. I'd vote for adding a new class MappingSqlQueryWithContext = where the parameters could be added to the context Map as "parameters". So we would have: MappingSqlQueryWithParameters abstract Object mapRow(ResultSet rs, int rowNum, Object[] parameters) MappingSqlQueryWithContext abstract Object mapRow(ResultSet rs, int rowNum, Map context) MappingSqlQuery abstract Object mapRow(ResultSet rs, int rowNum) > As I consider both a context map and a consolidation of all overloaded = mapRow > methods into MappingSqlQuery sensible and straightforward changes, I = suggest > to implement them promptly. I'm even willing to include this in 0.9.1, = to > reflect the merging of MappingSqlQueryWithParameters and = MappingSqlQuery as > early as possible. >=20 I don't think adding this to 0.9.1 would be a problem - it should be = pretty straightforward. Juergen, I don't know where you find the time to do = all you do for Spring. We're lucky to have you on the project. If you want me to = make thiese changes, I should have some time towards the end of this week. Thomas ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |