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 criteriaFind() criteria 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 "criteriaFind() criteria" Watch "criteriaFind() criteria" New topic
Author

criteriaFind() criteria

Steve Granton
Ranch Hand

Joined: Jan 13, 2002
Posts: 200
Hi,
I'm busy implementing the criteriaFind() and had the following thought:
Should we allow multiple criteria for a particular field? For instance, would the following criteria string be valid - "Destination airport=DEN,Destination airport=SFO"?
Has anyone else implemented this pseudo 'OR' statement?
Is it required for the assignment or is it enough to only allow one criteria for each field?
Also, maybe you could comment on my design of this method:
At present I am tokenising the criteria string on the ',' and then again on the '='. I then attempt map the fieldnames to fieldindexes in the schema - storing the search criteria values in an array with the position being the field index. I then iterate over the records in the datafile and try to match search criteria for values.
Thanks,
Steve
[ February 08, 2002: Message edited by: Steve Granton ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

No ors needed.
And the design for the tokenizer is the exact design I had.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: criteriaFind() criteria
 
Similar Threads
criteriaFind() question
criteria format in criteriaFind method
Question regarding criteriaFind()
return DataInfo[]
How to construct 'String criteria' ? Help!!!