public interface DocumentPage extends Page<DocumentRecord>, java.io.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,
size<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 java.lang.AutoCloseableclose in
interface java.io.CloseableCopyright © 2024 MarkLogic Corporation. All Rights Reserved.