Skip to content

Instantly share code, notes, and snippets.

@secondsun
Created January 11, 2013 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save secondsun/d835d4a56d4d25e4ca9a to your computer and use it in GitHub Desktop.
Save secondsun/d835d4a56d4d25e4ca9a to your computer and use it in GitHub Desktop.
public void readAllPaged() {
Pipe<Data> dataPipe = pipeline.get("data");
List<Data> dataList = dataPipe.readWithFilter(firstPage);
PageContext paging = dataPipe.getPageContext(dataList);
while (!dataList.isEmpty)
dataList = paging.next();
paging = dataPipe.getPageContext(dataList);
}
}
public void readAllPaged() {
Pipe<Data> dataPipe = pipeline.get("data");
List<Data> dataList = dataPipe.readWithFilter(firstPage);
if (dataList instanceof PagedList) {
PagedList pageList = (PagedList) dataList;
while (pageList.next())
Log.out(pageList);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment