CallMetaDataContext callContext = new CallMetaDataContext();
callContext.setAccessCallParameterMetaData(false);
callContext.setProcedureName(procedureName);
callContext.setFunction(function);
callContext.initializeMetaData(getDataSource());
callContext.processParameters(Arrays.asList(parameters));
SqlParameter cursorParameter = callContext.createReturnResultSetParameter("cursor", rowMapper);
this.callString = callContext.createCallString();
log.debug("Call string is: " + callString);