public FetcherPageIterator(Fetcher f, int nextPageSize) throws BrowseException { this.fetcher = f; this.nextPageSize = nextPageSize; nextPage = fetcher.getPage(); }
protected void fetchNext() { try { fetcher.fetchNext(nextPageSize); nextPage = fetcher.getPage(); } catch (BrowseException e) { throw new RuntimeException(e); } }
public FetcherIterator(Fetcher f, int pageSize) throws BrowseException { this.fetcher = f; fetcher.setPageSize(pageSize); currentPage = fetcher.getPage(); }
@Override public ResultPage getPage() throws BrowseException { ResultPage page = fetcher.getPage(); return processor == null ? page : processor.proccessPage(page); }
elementsPage = browseElements(ids.size(), ids).getPage(); } catch (BrowseException e) { throw new SystemException(Modules.BROWSER, "Error when accessing page of elements", e);
private BrowseResultsPage createPage() { final List<String> dataFields = getCurrentView().getDataFields(); final List<DataRow> rows = new ArrayList<DataRow>(); try { for (final Serializable[] row : fetcher.getPage().getData()) { if (row != null) { final DataRow dataRow = new DataRow(row, dataFields); rows.add(dataRow); if (getCurrentView().getEnchancer() != null) { getCurrentView().getEnchancer().enhanceRow(dataRow); } } } } catch (final Exception e) { throw new SystemException(Modules.BROWSER, "Exception when browsing", e); } return new BrowseResultsPage(rows); }
ResultPage page = f.getPage();