@Override public List<ProcessVariableSummary> getAll(QueryFilter filter) { return getProcessVariables(filter); }
@Override public PageResponse<ProcessVariableSummary> getData(QueryFilter filter) { PageResponse<ProcessVariableSummary> response = new PageResponse<ProcessVariableSummary>(); List<ProcessVariableSummary> processVariablesSums = getProcessVariables(filter); response.setStartRowIndex(filter.getOffset()); response.setTotalRowSize(processVariablesSums.size() - 1); if (processVariablesSums.size() > filter.getCount()) { response.setTotalRowSizeExact(false); } else { response.setTotalRowSizeExact(true); } response.setTotalRowSizeExact( true ); response.setTotalRowSize( processVariablesSums.size() ); if (!processVariablesSums.isEmpty()){ if (processVariablesSums.size() > (filter.getCount() + filter.getOffset())) { response.setPageRowList( new ArrayList<ProcessVariableSummary>( processVariablesSums.subList( filter.getOffset(), filter.getOffset() + filter.getCount() ) ) ); response.setLastPage( false ); } else { response.setPageRowList( new ArrayList<ProcessVariableSummary>( processVariablesSums.subList( filter.getOffset(),processVariablesSums.size()) ) ); response.setLastPage( true ); } } else { response.setPageRowList(new ArrayList<ProcessVariableSummary>(processVariablesSums)); response.setLastPage(true); } return response; }