I am creating a search engine for my database. I have JCheckBoxes that enable/diable JTextFields and/or JComboBoxes. I need to build a query based on what the user has selected and what has been typed in the textFields. Right now, there are a huge amount of IF statements in my code. But I was wondering if anyone knows a better, more dynamic way to build a query based on what I have told you. Thanks for any help.
how about trying regexp (IBM's regexp4j or Apaches jakarta-oro)? Create a full query string with placeholders and perform search/replace with the data you receive. I have to admit i haven't tried this, but it sounds feasible.