commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
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 <wspeirs@apache.org> 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)
to
Map<String, T> toMap(ResultSet rs, Class<T>)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message