public interface DocumentPage extends Page<DocumentRecord>, Closeable
DocumentRecord instances.
long start = 1;
DocumentPage page = documentManager.search(query, start);
try {
for (DocumentRecord record : page) {
String uri = record.getUri();
// ... do something ...
}
} finally {
page.close();
}
NOTICE! When you finish with this instance
you must call close() to free the underlying resources.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Frees the underlying resources, including the http connection.
|
<T extends AbstractReadHandle> |
nextContent(T contentHandle)
Convenience method combines the functionality of Page.next() and DocumentRecord.getContent().
|
getPageNumber, getPageSize, getStart, getTotalPages, getTotalSize, hasContent, hasNext, hasNextPage, hasPreviousPage, isFirstPage, isLastPage, iterator, next, sizeforEach, spliterator<T extends AbstractReadHandle> T nextContent(T contentHandle)
T - the type of AbstractReadHandle to returncontentHandle - the handle top populate with the contents from the next documentvoid close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2013-2016 MarkLogic Corporation.