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.
posted 15 years ago
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.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads