• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

A discrepancy in the specifications?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I find it quite strange that the UI specifications state, "[The UI] must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user." However, the specification for the find(String[]) method in the DB interface states, "A non-null value in criteria[n] matches any field value that begins with criteria[n]".

In other words, the search functionality of the UI cannot be written in terms of the DB interface, unless additional filtering is applied (one requires the criteria to match exactly, the other requires the criteria to match by prefix).

Thoughts?

P.S. what's with the "...or for records where the name AND/OR location fields exactly match values specified by the user"? Are they just trying to emphasize that it's not an XOR?
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's indeed a discrepancy, but it's an intended one This difference in requirements just simulates a real world example where you have already an implementation of a service (which might be used by other applications) and a new business requirement (for an existing or new application) where you can use the existing functionality, but with some slight changes (filtering the results returned by the find-method)

P.S. what's with the "...or for records where the name AND/OR location fields exactly match values specified by the user"? Are they just trying to emphasize that it's not an XOR?


That's just about your interpretation. In my GUI a user can execute 3 different searches (1. name and location 2. name only 3. location only). Others have developed a GUI with 4 possible searches (1. name and location 2. name or location 3. name only 4. location only).
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic