I was thinking more generally. What's the point of the FilterRowSet? Is it not always easier just to get the select statement to pick the rows that meet the criteria you want?admin wrote:To illustrate an approach, of courseAmbiorix wrote:Why would you go to the bother of creating a filter class when you could just include something like 'and GPA > 4.0' in the original select statement?
About Question enthuware.ocpjp.v7.2.1200 :
Moderator: admin
-
- Posts: 25
- Joined: Thu Jan 10, 2013 8:45 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1200 :
-
- Site Admin
- Posts: 10054
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1200 :
You might want to apply a filter on an existing rowset. It is just a facility/feature. It might not be useful very often but it could be useful when the opportunity to fire query is not present or the way you want to filter is not possible to code in the query.
If you like our products and services, please help us by posting your review here.
-
- Posts: 4
- Joined: Wed May 21, 2014 8:44 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1200 :
Section 9 of the exam guide at docs.oracle.com/javase/tutorial/extra/certification/javase-7-programmer2.html#jdbc does not cover the section about FilteredRowSet. It covers only RowSet as a general interface and JdbcRowSet. Does the actual exam cover detailed use of CachedRowSet, WebRowSet, FilteredRowSet, and JoinRowSet?
-
- Site Admin
- Posts: 10054
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1200 :
Yes, we have seen candidates getting question on these RowSets.
See this: http://www.coderanch.com/t/657283/java- ... -Enthuware
HTH,
Paul.
See this: http://www.coderanch.com/t/657283/java- ... -Enthuware
HTH,
Paul.
Last edited by admin on Sat Nov 21, 2015 7:59 pm, edited 1 time in total.
Reason: Added JavaRanch link
Reason: Added JavaRanch link
If you like our products and services, please help us by posting your review here.
-
- Posts: 3
- Joined: Sat Jun 28, 2014 8:43 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1200 :
If there is anyone else who, like me, was at first confused about the purpose of there being three evaluate methods, read the javadoc again more carefully!
http://stackoverflow.com/questions/5619 ... ate-method
Basically, the non-RowSet overloads are called by FilteredRowSet when you insert rows, the RowSet one is for queries... Do I have that right?
So in the code from the present Enthuware question, the two non-RowSet overloads would have affected the studentRS if we had moved to the insert row, updated its columns, and ran insertRow(). I suppose, since they returned false in ALL cases, any attempt to insert rows at all would have been blocked?
Thanks for any info in advance!
http://stackoverflow.com/questions/5619 ... ate-method
Basically, the non-RowSet overloads are called by FilteredRowSet when you insert rows, the RowSet one is for queries... Do I have that right?
So in the code from the present Enthuware question, the two non-RowSet overloads would have affected the studentRS if we had moved to the insert row, updated its columns, and ran insertRow(). I suppose, since they returned false in ALL cases, any attempt to insert rows at all would have been blocked?
Thanks for any info in advance!
Who is online
Users browsing this forum: No registered users and 49 guests