Hi David,
From the reply I had from you, I dived into the latest snapshot code and tried
to get the picture of what you said.
As you say I would only have to do:
List mylist = (List) run.query((String)queries.get(IQueries.ALL_EVENTS),
new BeanListHandler(Evento.class, new
BasicRowProcessor( new CustomColumnProcessor())));
And implement my CustomColumnProcessor where I should convert my row from the
recordset into my bean, probably with BeanUtils.
�Is this right?
If I change BasicRowProcessor or make a custom RowProcessor, with the changes
I have made, it only introduces a dependency on other package (now Commons
Converters), and anyone can use it as long as they implement custom converters
for their particular type conversions. Wherever they choose to use custom
converters, they just have to register them, with something simolar to:
ConvertUtils.register(new FechaConverter(),Fecha.class);
before they make a query with such a data type.
Not really sure which of the two alternatives would make code grow bigger as
the application grows.
Thanks for your response, and sorry for my english.
> Rather than add the dependency we added the ColumnProcessor interface.
> See the process() method javadocs here:
> http://jakarta.apache.org/commons/dbutils/apidocs/org/apache/commons/dbutils/ColumnProcessor.html
> You can implement this interface and use BeanUtils without adding a
> dependency to DbUtils and without changing BasicRowProcessor.
> ColumnProcessor will be included with 1.1 so let us know how it works for
> you or if it could be improved before release.
> David
Saludos,
-----------------------
"Recordad que estamos luchando por el honor de esa mujer,
lo que probablemente es mas de lo que ella hizo jamas."
GROUCHO MARX
-----------------------
Jorge Morales Pou
Telef�nica I+D, Madrid.
SPAIN
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]