• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

criteriaFind() criteria

Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
[ February 08, 2002: Message edited by: Steve Granton ]
Posts: 17346
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No ors needed.
And the design for the tokenizer is the exact design I had.
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic