* @param uriInfo the uri info
* @return the pageable collection
*/
@SuppressWarnings({ "rawtypes" })
private PageableCollection populatePagedReportQueryCollectionLinks(Map<String, Object> queryParams, List<Object[]> results, List<ReportItem> reportItems, UriInfo uriInfo) {
ReportQueryResultCollection response = new ReportQueryResultCollection();
for (Object result : results) {
ReportQueryResultListItem queryResultListItem = new ReportQueryResultListItem();
List<JAXBElement> jaxbFields = createShellJAXBElementList(reportItems, result);
if (jaxbFields == null) {
return null;
}
// We don't have a way of determining self links for the report query responses
// so, no links array will be inserted into individual items in the response
queryResultListItem.setFields(jaxbFields);
response.addItem(queryResultListItem);
}
response.setCount(results.size());
return populatePagedCollectionLinks(queryParams, uriInfo, response);
}