The CachedRowSet lacks a count method, but there are first, last,
beforeFirst, and afterLast methods that move the cursor, and next (or
prev) to step through. To simulate count, I move to last and then getRow
to see how many there are.
To create a blank CachedRowSet, I discovered you can select for a record
that you know isn't there to create an empty (but perfectly valid) set.
Though, the docs imply you could also do this programtically, perhaps
with the RowSetReader.
I don't know where the source code is either, or if it's available.
Perhaps we need to write our own implementation ;-)
Oleg V Alexeev wrote:
>
> Hello Ted,
>
> Good news... 8)
>
> Ted, now I end up my playing with rowsets and try to build working
> implementaion of RowSetFactory. But I have difficalties with some
> solutions. As for my early JDBCFactory, I try to read rows from
> somewhere in result set and process only limited count of it. But in
> CachedRowSet I can not find solution to move to the start row and read
> limited 'window'. Is there any way to do so?
>
> I found RowSetReaderImpl class in rowsets package and try to implement
> my own version of this reader, but there is not good result with it...
> Can I found somewhere source code for this class? I search JDC for it,
> but 'target not found'.
>
> May be I touch wrong way... Any suggestions?