I have a pl/sql procedure on an Oracle 11g that has the following parameters:
PROCEDURE validate_product
( product_id_in IN varchar2 ,
username_in in va
There is a simple workaround for that restriction, which does not require a wrapper procedure, simply wrap the boolean parameter in PL/SQL in a CASE
statement and use an Integer for binding:
stmt = connection.prepareCall("begin"
+" booleanFunc(par_bool => (CASE ? WHEN 1 THEN TRUE ELSE FALSE END)); "
+"end;"
);
// now bind integer, 1 = true, 0 = false
stmt.setInt(1, 0); // example for false
You may wrap the Integer during bind the other way around, if your method uses boolean, for example:
// now bind integer, 1 = true, 0 = false
stmt.setInt(1, myBool ? 1 : 0);