Good method is sequential creation of WHERE clause (and whole query, of course) as character string:

Start with empty string.
Test each parameter and if given, add string ' AND column=value_of_parameter '
If final string is not empty, replace the first 'AND' with 'WHERE'
Put it to the rest of query.
Then send it to Oracle.

Hope It's not confusing.
Ales