This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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="fred"; criteria="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="fred"; criteria="adel"; criteria="and"; or criteria="or";