It 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.
Elchin Asgarli wrote:I have looked around in the forum for answer to my coming question, but could not find a straightforward reply, so I will ask it.
In first case I am thinking of having a text field and search button for searching through all fields, and for second case a search dialog where you can specify name and location, and drop-down box to select whether you want to search location, name or both.
OCMJD 6, OCPJP8, CISSP Baroque Potion, G+
A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public int[] find(String[] criteria);
It 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.
SCJP 6 , OCMJD 6 ,
http://www.robertbenson.ie/
OCMJD 6, OCPJP8, CISSP Baroque Potion, G+
Elchin Asgarli wrote:David, so from what I understood you took approach closer to my 1st assumption. So just few questions to make it 100% clear:
1. In your GUI the user could only search/filter through name and location fields, right? It was impossible to search lets say customer ID field.
2. A record can satisfy your eight point only if it has the same name as its location, true?
3. Does your business method call find() method of Data class and then filter its results to 'exact matches'? Or does it read all the records and filter manually?
Now I think that it may have been redundant, since returning all the records could be achieved by calling find with all null parameters inside the criteria.
OCMJD 6, OCPJP8, CISSP Baroque Potion, G+
Roel De Nijs wrote:My (simple) GUI contains 2 fields: one for location and for name. So the user has 4 possibilities:
retrieve all hotel rooms (leave both input fields empty) search on a name (enter a value in the input field name and leave the input field location empty) search on a location (enter a value in the input field location and leave the input field name empty) search on both name and location (enter a value in both input fields)
I think it can't get easier than this. Correct me if I'm wrong
Elchin Asgarli wrote:The requirement states "It must allow the user to search the data for all records". Does this mean that UI MUST allow user to search for given expression in all the records, or does this simply mean that UI search functionality must only allow user to retrieve all records? In other words, can this requirement be rephrased into "It must allow the user to retrieve data for all the records"? Its more of an English question than technical.
OCMJD 6, OCPJP8, CISSP Baroque Potion, G+
SCJP 6, OCMJD6
SCJP 6, OCMJD6
OCMJD 6, OCPJP8, CISSP Baroque Potion, G+
Paper beats rock. Scissors beats tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|