I want to make sure about discussion "B&S - serching" below.
I am doing B&S 2.1.1.
I have
"public int[] find(
String[] criteria)."
And I have a sentese in The User Interface specification:
"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."
In the DB schema, name is first field and location is second field.
Therefore, can i call find method like :
String[] criteria = new String[];
criteria[0]="fred";
criteria[1]="adel";
int[] returnResult = DBImp.find(criteria);
and result will have int array of record numbers matching the value in name field( i.e both of "fred" and "freddy") and/or match the value in location (i.e both of "adel" and "adelaide")
Am i right?
another question is about "AND/OR" in "where the name AND/OR location fields exactly match values specified by the user."
I have no idea how i can make code "name and location" and "name or location".
if i pass the criteria array value below
String[] criteria = new String[];
criteria[0]="fred";
criteria[1]="adel";
criteria[2]="and"; or criteria[2]="or";
do you think it will be fine?