Well, all that you say is fine. I was not sure how this needs to be implemented.
What we have done is based on the tables we have created sub queries which based on the search criteria get included in the final query or not, now all this work is done in a Utility class.
I wanted to know is this a best way to build a search module or is there a design
pattern which recommends how this can be done?
As I tried searching for this on the net but did not find anything useful.
Also we are following a SOA architecture so we give a lot of importance to reusability, now this peace of module if implemented this way will not be reusable. How can I make a Search Module that can be reused across different applications in a Domain like say Insurance.
My requirement was to build a Search screen and module where in a user keys in certain fund attributes and it generates a query dynamically (as i described above) and queries a DB and gets me a result. Now if I want to plug out this queries and use another set of queries how can I do this, will a command pattern kind of design work?
I am fine with doing Pagination on the screen or the DB storing 2000-5000 odd fund records.