|
From: <tri...@tr...> - 2003-07-23 13:49:45
|
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: > 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. > 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 |