commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DBUTILS-74) New ListResultSetHandler with a ResultSetHandler as parameter
Date Wed, 16 Jul 2014 15:31:06 GMT

     [ https://issues.apache.org/jira/browse/DBUTILS-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benedikt Ritter updated DBUTILS-74:
-----------------------------------

    Description: 
It would be great if we could have such a class:

{code:java}
public class DefaultListResultSetHandler<T> extends AbstractListHandler<T> {
  public DefaultListResultSetHandler (ResultSetHandler<T> handler) {
   if (handler == null) throw new NullPointerException();
    this.handler = handler;
  }
  protected T handleRow (ResultSet rs) {
    return handler.handle(rs);
  }
}
{code}

This way, we avoid having two classes, one for the object handler itself and one for the list
handler. It's a all at once.

  was:
It would be great if we could have such a class:

public class DefaultListResultSetHandler<T> extends AbstractListHandler<T> {
  public DefaultListResultSetHandler (ResultSetHandler<T> handler) {
   if (handler == null) throw new NullPointerException();
    this.handler = handler;
  }
  protected T handleRow (ResultSet rs) {
    return handler.handle(rs);
  }
}

This way, we avoid having two classes, one for the object handler itself and one for the list
handler. It's a all at once.


> New ListResultSetHandler with a ResultSetHandler as parameter
> -------------------------------------------------------------
>
>                 Key: DBUTILS-74
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-74
>             Project: Commons DbUtils
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Olivier Grégoire
>             Fix For: 1.6
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> It would be great if we could have such a class:
> {code:java}
> public class DefaultListResultSetHandler<T> extends AbstractListHandler<T>
{
>   public DefaultListResultSetHandler (ResultSetHandler<T> handler) {
>    if (handler == null) throw new NullPointerException();
>     this.handler = handler;
>   }
>   protected T handleRow (ResultSet rs) {
>     return handler.handle(rs);
>   }
> }
> {code}
> This way, we avoid having two classes, one for the object handler itself and one for
the list handler. It's a all at once.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message