This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Do we need to filter the search result data? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Do we need to filter the search result data?" Watch "Do we need to filter the search result data?" New topic
Author

Do we need to filter the search result data?

Chih-Wei Lee
Ranch Hand

Joined: Feb 20, 2008
Posts: 129
I am confused on the instruction about search function.
Here is description in instruction:

UI:
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.

DB:
Returns an array of record numbers that match the specified
criteria. Field n in the database file is described by
criteria[n]. A null value in criteria[n] matches any field
value. A non-null value in criteria[n] matches any field
value that begins with criteria[n]. (For example, "Fred"
matches "Fred" or "Freddy".)

Does this mean I need to filter the search result data?
For example, user enter "Fred: on UI, find() method will reture any record begin with "Fred" (includes "Freddy").
But we need to filter those record which are not exactly "Fred", like "Freddy".
And only show the record "Fred" to user.

Is this correct?

Thanks for response.

Lee


SCEA, SCJD, SCDJWS, SCWCD, SCJP
mohamed sulibi
Ranch Hand

Joined: Sep 04, 2005
Posts: 169
hiz;

yes it is ok, but now the question is where you filter the result ? in the server side or in the client side ? document your decision carefully

regards.
Mohamed darim.
 
jQuery in Action, 2nd edition
 
subject: Do we need to filter the search result data?
 
Similar Threads
which to follow when the instruction and the DB interface conflict to each other
URLyBird findByCriteria
Find requirement seems inconsistent. Help
a question about requirement, findByCriteria
URLyBird: What is "exactly match" in URLyBird?