return getTransactionTemplateRetrying(getMaxRetries()).execute(new TransactionCallback<Pair<List<D>, Paging>>() {
@Override
public Pair<List<D>, Paging> doInTransaction(final TransactionStatus status) {
final List<D> result = newArrayList();
Paging paging;
s_logger.debug("with args {}", args);
final NamedParameterJdbcOperations namedJdbc = getDbConnector().getJdbcTemplate();
if (pagingRequest.equals(PagingRequest.ALL)) {
result.addAll(namedJdbc.query(sql[0], args, extractor));
paging = Paging.of(pagingRequest, result);