Well, what about generating a query like
SELECT * FROM some_table WHERE 1 AND ... AND ... AND ... etc..
like so:
StringBuffer buffer = new StringBuffer();
buffer.append("select * from some_table WHERE 1 ");
if(Util.textHasContent(query.getField1()))
{
buffer.append("AND...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.