Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

CursorFetchResult Class

This class encapsulates the result of a PaginationCursor.fetchPage() call. It contains methods that get the rows for the current page, the start index of the next page, and the number of deleted rows skipped during the fetch operation. It also contains a method that indicates whether the pagination cursor has fetched all available rows in the result set.

Namespace

Database

CursorFetchResult Methods

The following are methods for CursorFetchResult.

getNextIndex()

Gets the start index required to fetch the next page of results. Use this value as the start parameter in the call to PaginationCursor.fetchPage(start, pageSize) to fetch the next page of results.

Signature

public Integer getNextIndex()

Return Value

Type: Integer

getNumDeletedRecords()

Gets the number of deleted rows that were skipped during the fetch operation.

Signature

public Integer getNumDeletedRecords()

Return Value

Type: Integer

getRecords()

Gets the list of records that comprise the rows on the current page.

Signature

public List<SObject> getRecords()

Return Value

Type: List<sObject>

The list of sObjects from the SOQL query for the current page.

isDone()

Returns true if the pagination cursor has reached either the page size passed to PaginationCursor.fetchPage(start, pageSize) or the end of the result set. Otherwise returns false.

Signature

public Boolean isDone()

Return Value

Type: Boolean