@Override public ISearchResults<IBatchOperation> listBatchOperations(boolean includeDeleted, ISearchCriteria criteria) throws SiteWhereException { return delegate.listBatchOperations(includeDeleted, criteria); }
@RequestMapping(method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "List batch operations") @Secured({ SiteWhereRoles.REST }) @Documented(examples = { @Example(stage = Stage.Response, json = BatchOperations.ListBatchOperationsResponse.class, description = "listBatchOperationsResponse.md") }) public ISearchResults<IBatchOperation> listBatchOperations( @ApiParam(value = "Include deleted", required = false) @RequestParam(defaultValue = "false") boolean includeDeleted, @ApiParam(value = "Page number", required = false) @RequestParam(required = false, defaultValue = "1") @Concerns(values = { ConcernType.Paging }) int page, @ApiParam(value = "Page size", required = false) @RequestParam(required = false, defaultValue = "100") @Concerns(values = { ConcernType.Paging }) int pageSize, HttpServletRequest servletRequest) throws SiteWhereException { Tracer.start(TracerCategory.RestApiCall, "listDeviceGroups", LOGGER); try { SearchCriteria criteria = new SearchCriteria(page, pageSize); ISearchResults<IBatchOperation> results = SiteWhere.getServer() .getDeviceManagement(getTenant(servletRequest)).listBatchOperations(includeDeleted, criteria); List<IBatchOperation> opsConv = new ArrayList<IBatchOperation>(); for (IBatchOperation op : results.getResults()) { opsConv.add(BatchOperation.copy(op)); } return new SearchResults<IBatchOperation>(opsConv, results.getNumResults()); } finally { Tracer.stop(LOGGER); } }