storedProcedure = new StoredProcedure(name, method.getGenericReturnType(), sprocStrategy,
scA.runOnAllShards(), scA.searchShards(), scA.parallel(), resultMapper,
scA.timeoutInMilliSeconds(), scA.adivsoryLockType(), useValidation, scA.readOnly(),
writeTransaction);
if (!"".equals(scA.sql())) {
storedProcedure.setQuery(scA.sql());
}
} catch (final InstantiationException | IllegalAccessException e) {
LOG.error("Could not instantiate StoredProcedure. ABORTING.", e);
return null;