cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: RresultSet within JXTemplate?
Date Fri, 23 Jul 2004 15:27:21 GMT
Stephan Coboos wrote:

> Hello,
>
> is it possible to set a java.sql.ResultSet witin a JXTemplate and then 
> iterate over the contents?
>
> I need this way to print out > 600000 Elements from a database into an 
> xml. So it is not possible to create beans before.
>
First answer: dunno.
Second answer: does ResultSet implement java.util.Collection? If so, I 
suspect you could do it.
Third answer: if ResultSet doesn't implement Collection, then you could 
write a simple wrapper class that does, along with a simple 
implementation of Iterator, that can iterate over the rows of a ResultSet.

Hope that helps.

Upayavira




Mime
View raw message