@Override public Page<ChildT> nextPage(String nextPageLink) throws RestException, IOException { if (nextPageLink.equalsIgnoreCase(switchToCousin)) { // Reached end of current child paged list, make next child list(cousin) as current // paged list and return it's first page. currentChildList = nextChildList(); return childListPage(currentChildList.currentPage()); } else { currentChildList.loadNextPage(); return childListPage(currentChildList.currentPage()); } } };
@Override public Page<ChildT> nextPage(String nextPageLink) throws RestException, IOException { if (nextPageLink.equalsIgnoreCase(switchToCousin)) { // Reached end of current child paged list, make next child list(cousin) as current // paged list and return it's first page. currentChildList = nextChildList(); return childListPage(currentChildList.currentPage()); } else { currentChildList.loadNextPage(); return childListPage(currentChildList.currentPage()); } } };
/** * flatten the child paged lists. * * @return the lazy flattened paged list from the child paged lists * @throws CloudException exceptions thrown from the cloud * @throws IOException exceptions thrown from serialization/deserialization */ public PagedList<ChildT> flatten() { this.currentChildList = nextChildList(); if (this.currentChildList == null) { return emptyPagedList(); } return new PagedList<ChildT>(childListPage(currentChildList.currentPage())) { @Override public Page<ChildT> nextPage(String nextPageLink) throws RestException, IOException { if (nextPageLink.equalsIgnoreCase(switchToCousin)) { // Reached end of current child paged list, make next child list(cousin) as current // paged list and return it's first page. currentChildList = nextChildList(); return childListPage(currentChildList.currentPage()); } else { currentChildList.loadNextPage(); return childListPage(currentChildList.currentPage()); } } }; }
/** * flatten the child paged lists. * * @return the lazy flattened paged list from the child paged lists * @throws CloudException exceptions thrown from the cloud * @throws IOException exceptions thrown from serialization/deserialization */ public PagedList<ChildT> flatten() { this.currentChildList = nextChildList(); if (this.currentChildList == null) { return emptyPagedList(); } return new PagedList<ChildT>(childListPage(currentChildList.currentPage())) { @Override public Page<ChildT> nextPage(String nextPageLink) throws RestException, IOException { if (nextPageLink.equalsIgnoreCase(switchToCousin)) { // Reached end of current child paged list, make next child list(cousin) as current // paged list and return it's first page. currentChildList = nextChildList(); return childListPage(currentChildList.currentPage()); } else { currentChildList.loadNextPage(); return childListPage(currentChildList.currentPage()); } } }; }
Page<U> uPage = uList.currentPage(); final PageImpl<V> vPage = new PageImpl<>(); vPage.setNextPageLink(uPage.nextPageLink());
Page<U> uPage = uList.currentPage(); final PageImpl<V> vPage = new PageImpl<>(); vPage.setNextPageLink(uPage.nextPageLink());
Page<U> uPage = uList.currentPage(); final PageImpl<V> vPage = new PageImpl<>(); vPage.setNextPageLink(uPage.nextPageLink());