record("Message", "data", "queryId", dataRequest.queryId,
"startRow", dataRequest.startRow,
"maxSize", dataRequest.maxSize);
if(rows == 0) {
DataResponse response = new DataResponse();
response.queryId = dataRequest.queryId;
response.startRow = 1;
response.more = false;
response.data = Collections.emptyList();
logger.debug("Server sending empty response for 0 row result.");
return response;
} else if(dataRequest.startRow <= rows) {
DataResponse response = new DataResponse();
response.queryId = dataRequest.queryId;
response.startRow = dataRequest.startRow;
int size = dataRequest.maxSize;
int last = dataRequest.startRow + size - 1; // 1-based