This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Clarification on CriteriaFind Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Clarification on CriteriaFind" Watch "Clarification on CriteriaFind" New topic

Clarification on CriteriaFind

christy smile
Ranch Hand

Joined: Oct 15, 2001
Posts: 101
Hi, All,
I have a question about CriteriaFind() method.
What is the correct behavior if the user does not either a destination or origination? Is it going to treat it as "any" is entered for the blank criteria?? What if nothing is entered at all? My implementation reports no route is available if neither is entered. But if one criteria is entered, it will treat the empty criteria as "any" and use the other criteria to search. Is this the correct interpretation??
Thank you!
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17271

Is this the correct interpretation??

I really believe that this is a design choice for you to decide.
If you where using the application and you wanted to search for flights, and you left them blank, what would you expect.
I expected to see all flights, but that is just me, you might think differently here and that is 100% fine.

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Have you checked out Aspose?
subject: Clarification on CriteriaFind
It's not a secret anymore!