commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject [DBUTILS] Generic ArrayHandler (was: Pre RC for DBUTILS-2.0)
Date Mon, 13 May 2013 21:16:44 GMT
On 10 May 2013 21:23, William Speirs <> wrote:
> Consider this a pre release candidate for DBUTILS-2.0. I fixed the
> following things from RC1:
> - Removed @author tags
> - Changed QueryRunner to be public
> - Made ArrayHandler generic (but it's ugly because I just cast to T[], does
> anyone have a better idea here?)

Why not change the interface method? i.e. change

Object[] RowHander.toArray(ResultSet rs)
to be
T[] RowHander.toArray(ResultSet rs, Class<T>)

The toBean methods in the interface require the class to be provided

Indeed, why not also change the other method?

Map<String, Object> toMap(ResultSet rs)
Map<String, T> toMap(ResultSet rs, Class<T>)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message