• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

criteriaFind method doubt regarding requirement !

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In criteriaFind I am planning to implement criterias for
carrier, origin & destination. So restricting criteria search to these 3 fields is ok ? Since nothing specific asked in the requirement!
Also instructions for UI says,
"The user must be able to describe enter the string value "any" for the origin, destination, or both, so as to implement a wildcard-like feature. "
So am i supposed to implement search like for airport, SFO, wildcard search is S* ?
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shivaji Bhosale:
In criteriaFind I am planning to implement criterias for
carrier, origin & destination. So restricting criteria search to these 3 fields is ok ?

No. Please distinguish between your database and the FBN application. You are specifically required to code the database for reuse. There can be no application dependencies in the database. This rules out restricting criteriaFind() to certain field names. It also rules out supporting the 'ANY' wildcard feature at the database level; that's a user interface thing.
There is no requirement to support true wildcards.
- Peter
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, I've got a question about requirements too:
a) what would you expect to see if criteriaFind("") is called with an empty String? All records, just as an empty SQL WHERE clause?
b) the specs said field names must be matched (<field name>=<value to mach>) and an example is provided ("Carrier='SpeedyAir',Origin='SFO'" ). But the field names contain spaces, like "Origin airport", not just "Origin".
So what do you think would be most appropriate? using the original field name including spaces? only the first part? use my own name for each field? or ???

thanks,
Martin
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a) That's up to you to decide. Given the syntax you are asked to implement, you can make a case for interpreting this as "no criteria set". But you can also make a case for treating this as an illegal argument. I don't think there is a single "right" answer.
b) At the database level the only names you can refer to are the field names from the disk file (remember: the re-use requirement implies that the database should be fully generic!) It doesn't really make a lot of sense to introduce aliases. And accepting partial field names introduces unnecessary complexity and ambiguity.
- Peter
 
Shivaji Bhosale
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So to conclude with criteriaFind,
1.Make your search for all the fields (which came along initially)in the Database.
2.In criteria, name must equal to the actual field name in the Database, in order to avoid aliasing field names should not put any complexity for re-use in further enhancements.
3.Wildcard search doesnt mean to be taken literally. Actually wild card search term in requirement is confusing.
Is that right with what I understood ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic