Hi all,
This is what my requirements have to say.
"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."
What did you all implement (those who had similar requirement ofcourse). Did you assume AND or an OR or provide an UI flag to choose between the two ?
The problem is that I have created a Criteria.java class that encapsulates to some extent all the filteration rules and it only supports AND, but I do not know how to create a generic AND/OR expression for example
(parm1 == A OR parm2 == B) AND parm3 == C
The reason to think in this manner is that the find(
String[] criteria) in DBMain.java is pretty much useless to capture any nuance and the requirements want this to be extensible. I cannot assume that only location and name fields will be in the expression such as
location == X AND name == Y
location == X OR name == Y
It could be any combination of the 7 DB columns.
Any clues
Thanks
-- Rag