About Question enthuware.ocpjp.v7.2.1200 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Ambiorix
Posts: 25
Joined: Thu Jan 10, 2013 8:45 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1200 :

Post by Ambiorix »

admin wrote:
Ambiorix 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?
To illustrate an approach, of course :)
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
Site Admin
Posts: 10054
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1200 :

Post by admin »

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.

telston
Posts: 4
Joined: Wed May 21, 2014 8:44 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1200 :

Post by telston »

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?

admin
Site Admin
Posts: 10054
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1200 :

Post by admin »

Yes, we have seen candidates getting question on these RowSets.

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
If you like our products and services, please help us by posting your review here.

lunars
Posts: 3
Joined: Sat Jun 28, 2014 8:43 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1200 :

Post by lunars »

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests