[ http://issues.apache.org/jira/browse/IBATIS-226?page=comments#action_12422685 ] Fabio Insaccanebbia commented on IBATIS-226: --------------------------------------------
Has anybody tried to implement this RFE? I've tried and I have an implementation but I feel it's a bit naive (I don't have enough experience of the inner workings of iBatis) Do you expect to create a "DefaultResultSetHandler" that encapsulates all the logic iBatis has to transform a ResultSet into an Object of some sort? Or do you think the ResultSetHandler is just something "alternative" to the normal logic? Something like: if (rsh != null) { result= rsh.handle(rs); } else { // ...normal logic here.. } The second way (the one I tried to develop) has as a consequence that there is no way to use ibatis "paging" or "caching" when using the ResultSetHandler; is this acceptable? > Support Commons DBUtils ResultSetHandler > ---------------------------------------- > > Key: IBATIS-226 > URL: http://issues.apache.org/jira/browse/IBATIS-226 > Project: iBatis for Java > Issue Type: New Feature > Components: SQL Maps > Reporter: Paul Benedict > > Sometimes I need total control over the caching mechanism for very critical > systems. I need to also guarantee object identity and I can only do this when > handling the result set myself. I propose adding an attribute to the > <statement> tag (and also <select>, <insert>, <update>) that will specify a > subclass of ResultSetHandler so that I may write custom code and decode the > ResultSet myself. The ResultSetHandler class is part of the Jakarta Commons > DBUtils package. It is extremely useful! > <select id="findMyObject" resultSetHandler="com.company.MyResultSetHandler"> > To prevent excess object creation, IBATIS must reuse the same instance it > creates. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira