There is one problem with my idea.

If we have say ScalarHandler and my ListHandler when question arise: who is responsible for scrolling ResultSet rows?
I guess ScalarHandler does and ListHandler need to assume that ScalarHandler will scroll by one row.


So fixed ListHandler code will be:
=====================
   public Object handle(ResultSet rs) throws SQLException {
       List result = new ArrayList();
       while(!rs.isAfterLast()) {
           Object o = rowHandler.handle(rs);
           result.add(o);
       }
       return result;
   }
=====================

But here there is another problem. As I know not all drivers supports isAfterLast() method.

I appreciate any comments about ListHandler idea and solutions for my problem (reuse as much code as possible when
generating custom lists).


Best regards,
Mikhail Krivoshein



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to