com.crystaldecisions.sdk.occa.report.data
Interface ICursor

All Known Implementing Classes:
CompositeCursor, RowsetCursor, SearchResultCursor

public interface ICursor

This interface is used to navigate through the records in a record batch. Use the move methods to navigate around the batch. The getCurrentRecord() method is used to retrieve the record that the cursor is currently pointing to.

Cursor is a helper object that inherits much of its behavior from the Rowset object. It also acts as a base class from which the RowsetCursor object and SearchResultCursor object inherit.


Method Summary
 void addNew()
           Reserved for future use.
 void delete()
           Reserved for future use.
 Record getCurrentRecord()
           The record the cursor is currently pointing at.
 int getCurrentRecordNumber()
           Returns the record number of the current cursor position.
 boolean getIsTotalRecordKnown()
           Returns true if the total number of records is known, and false otherwise.
 int getRecordCount(FetchedRecordCountInfo info)
           Returns the number of records in the record batch.
 boolean isEOF()
           Returns true if the cursor points to the last record, false otherwise.
 void moveFirst()
           Moves the cursor to the first record in the batch.
 void moveLast()
           Moves the cursor to the last record in the batch.
 boolean moveNext()
           Moves to the next record in the batch.
 boolean movePrevious()
           Moves to the previous record in the batch.
 boolean moveTo(int index)
           Moves to a specified record in the batch.
 

Method Detail

addNew

void addNew()
            throws ReportSDKException

Reserved for future use.

Throws:
ReportSDKException

delete

void delete()
            throws ReportSDKException

Reserved for future use.

Throws:
ReportSDKException

getCurrentRecord

Record getCurrentRecord()
                        throws ReportSDKException

The record the cursor is currently pointing at. The value returned by this method is updated whenever you move the cursor using any of the move functions.

Returns:
A Record object containing the record the cursor is currently pointing at.
Throws:
ReportSDKException

getCurrentRecordNumber

int getCurrentRecordNumber()
                           throws ReportSDKException

Returns the record number of the current cursor position.

Returns:
An int that specifies the record number of the current cursor position.
Throws:
ReportSDKException

getIsTotalRecordKnown

boolean getIsTotalRecordKnown()
                              throws ReportSDKException

Returns true if the total number of records is known, and false otherwise.

Under certain circumstances, the total record count is not known:

If the value of this property is true, then the value of the getRecordCount method is the final total number of records.

Returns:
true if the total number of records is known, and false otherwise.
Throws:
ReportSDKException

getRecordCount

int getRecordCount(FetchedRecordCountInfo info)
                   throws ReportSDKException

Returns the number of records in the record batch. If the value of getIsTotalRecordKnown() method is true, then the value returned by this method is the final total number of records. If the value of the getIsTotalRecordKnown() method is false, then this method returns an undefined result.

Parameters:
info - A FetchedRecordCountInfo object containing key properties of the fetched records.
Returns:
An int that specifies the number of records in the batch.
Throws:
ReportSDKException

isEOF

boolean isEOF()
              throws ReportSDKException

Returns true if the cursor points to the last record, false otherwise.

Returns:
true if the cursor points to the last record, false otherwise.
Throws:
ReportSDKException

moveFirst

void moveFirst()
               throws ReportSDKException

Moves the cursor to the first record in the batch.

Throws:
ReportSDKException

moveLast

void moveLast()
              throws ReportSDKException

Moves the cursor to the last record in the batch.

Throws:
ReportSDKException

moveNext

boolean moveNext()
                 throws ReportSDKException

Moves to the next record in the batch.

Returns:
true if the cursor advanced successfully, and false if the cursor already points to the last record in the batch.
Throws:
ReportSDKException

movePrevious

boolean movePrevious()
                     throws ReportSDKException

Moves to the previous record in the batch.

Returns:
true if the cursor advanced successfully, and false if the cursor already points to the first record in the batch.
Throws:
ReportSDKException

moveTo

boolean moveTo(int index)
               throws ReportSDKException

Moves to a specified record in the batch. If you supply an index that is out of bounds the method will fail.

Parameters:
index - The index of the record in the batch. The batch is zero-based.
Returns:
true if there are more records after the index moved to, otherwise false. false will be returned when the move is to the last indexed record.
Throws:
ReportSDKException