/**
* Define the query arguments based on the procedure call.
*/
protected static void applyArguments(StoredProcedureCall call, DatabaseQuery query) {
if (call instanceof PLSQLStoredProcedureCall) {
PLSQLStoredProcedureCall plsqlCall = (PLSQLStoredProcedureCall)call;
for (int index = 0; index < plsqlCall.getArguments().size(); index++) {
PLSQLargument argument = plsqlCall.getArguments().get(index);
int type = argument.direction;
if ((type == StoredProcedureCall.IN) || (type == StoredProcedureCall.INOUT)) {
if (call.hasOptionalArguments()) {
query.addArgument(argument.name, Object.class, call.getOptionalArguments().contains(new DatabaseField(argument.name)));
} else {