use of com.serotonin.m2m2.db.dao.ResultsWithTotal in project ma-core-public by infiniteautomation.
the class EventInstanceDwr method dojoQuery.
/**
* Load a list of VOs
* @return
*/
@Override
@DwrPermission(user = true)
public ProcessResult dojoQuery(Map<String, String> query, List<SortOption> sort, Integer start, Integer count, boolean or) {
ProcessResult response = new ProcessResult();
// Set the Export Query (HACK, but will work for now for exporting)
this.setExportQuery(query, sort, or);
// TODO Use the Event Manager to access Current Events since the DO NOT LOG events are only in memory
query.put("userId", Common.getHttpUser().getId() + "");
ResultsWithTotal results = dao.dojoQuery(query, sort, start, count, or);
response.addData("list", results.getResults());
response.addData("total", results.getTotal());
return response;
}
Aggregations