Re: FilteredRowSet size
- From: "kuassi.mensah@xxxxxxxxx" <kuassi.mensah@xxxxxxxxx>
- Date: 4 Mar 2007 11:23:23 -0800
Hi,
Have you tried chunking/paging the rowset? The javadoc says that
size() also returns the number of rows in the current page but maybe
this is not what you are looking for.
Kuassi http://db360.blogspot.com/2006/09/manipulating-tabular-data-using-jdbc_03.html
On Mar 2, 9:51 am, "Carl Leiby" <carl.le...@xxxxxxxxx> wrote:
Hello,
I'm working on a Swing app. I want to show a pair of parent/child
JTables so that selection within the parent drives filtering in the
child. It seemed to me that FilteredRowSet would be ideal for this.
So I wrote a TableModel on top of a FilteredRowSet. I can vary the
filter and get different sets of information in the JTable.
It almost works. The problem is in my implementation of getRowCount.
It seems that FilteredRowSet doesn't override the CachedRowSet
implementation of size() to tell me how many rows are in the filtered
subset. calling last() and getRow() doesn't work cause I get the row
number relative to the superset of results.
The only way I see to make it work is to first() and next() till the
end and count the rows myself. That seems insane and terribly
inefficient. Am I wrong? Please tell me that there's a better way.
Thanks
.
- Follow-Ups:
- Re: FilteredRowSet size
- From: Carl Leiby
- Re: FilteredRowSet size
- References:
- FilteredRowSet size
- From: Carl Leiby
- FilteredRowSet size
- Prev by Date: Miami Java Users Group (MJUG)
- Next by Date: Re: FilteredRowSet size
- Previous by thread: FilteredRowSet size
- Next by thread: Re: FilteredRowSet size
- Index(es):
Relevant Pages
|
|