File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes criteriaFind Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "criteriaFind" Watch "criteriaFind" New topic
Author

criteriaFind

Brian Blignaut
Ranch Hand

Joined: Jan 08, 2003
Posts: 61
Hi,
The spec for the criteriaFind method says :
"In the event of an invalid field name being provided as part of the criteria the behavior of this method is the same as if no records matched correctly specified criteria."
It also says "For example, the following argument string would select all records describing flights by the SpeedyAir carrier that originate in San Francisco.
"Carrier='SpeedyAir',Origin='SFO'"
However 'Origin' is not a valid field name? The valid field name would be 'Origin airport'?
Am I missing something?
Thanks
Brian
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

However 'Origin' is not a valid field name? The valid field name would be 'Origin airport'?

It's just a typo in the requirements.
Eugene.
Brian Blignaut
Ranch Hand

Joined: Jan 08, 2003
Posts: 61
By that I assume you mean to match on Origin Airport? Thanks for the reply
Brian Blignaut
Ranch Hand

Joined: Jan 08, 2003
Posts: 61
Regarding the search the spec states :
For example, the following argument string would select all records describing flights by the SpeedyAir carrier that originate in San Francisco.
"Carrier='SpeedyAir',Origin='SFO'"
are the ' characters around the value neccasary?
Thanks
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
Looks necessary to me.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by Brian Blignaut:
are the ' characters around the value neccasary?
Well, an important part of this assignment is you doing systematic analysis and design. Often there is more than one answer, or there are insights to be had. You should really form your own opinion.
What happens if you omit the quotes? Are searches more restricted if you use one syntax or the other? Remember that Data is a fully generic database engine that is by no means restricted to the little FBN project you are doing.
- Peter
 
 
subject: criteriaFind