
com.marklogic.client.document.DocumentPage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-client-api Show documentation
Show all versions of marklogic-client-api Show documentation
The official MarkLogic Java client API.
The newest version!
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.client.document;
import com.marklogic.client.Page;
import com.marklogic.client.io.marker.AbstractReadHandle;
import java.io.Closeable;
/** Allows iteration over documents in the page as {@link DocumentRecord} instances.
* {@code
*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.
*/
public interface DocumentPage extends Page, Closeable {
/** Convenience method combines the functionality of Page.next() and DocumentRecord.getContent().
* @param contentHandle the handle top populate with the contents from the next document
* @param the type of AbstractReadHandle to return
* @return the contents of the next document
*/
T nextContent(T contentHandle);
/** Frees the underlying resources, including the http connection. */
@Override
void close();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy