com.crystaldecisions.sdk.occa.report.application
Class SearchResultCursor

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.application.SearchResultCursor
All Implemented Interfaces:
ICursor

public class SearchResultCursor
extends java.lang.Object
implements ICursor

This object is used to navigate the results of a search. Create the cursor with the SearchController object's createCursor method.


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)
          Since this method also needs to return info indicating if all the records have been retrieved, include the FetchedRecordCountInfo structure.
 IRowset getRowset()
           Returns the records that contain the search results fetched from the server.
 IRowsetMetaData getRowsetMetaData()
           Returns information about the fields that the items in the record correspond to.
 boolean isEOF()
           Returns true if the cursor is past end of rowset or before beginning, and 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addNew

public void addNew()
Description copied from interface: ICursor

Reserved for future use.

Specified by:
addNew in interface ICursor

delete

public void delete()
Description copied from interface: ICursor

Reserved for future use.

Specified by:
delete in interface ICursor

getCurrentRecord

public Record getCurrentRecord()
Description copied from interface: ICursor

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.

Specified by:
getCurrentRecord in interface ICursor
Returns:
A Record object containing the record the cursor is currently pointing at.

getCurrentRecordNumber

public int getCurrentRecordNumber()
Description copied from interface: ICursor

Returns the record number of the current cursor position.

Specified by:
getCurrentRecordNumber in interface ICursor
Returns:
the index of the current record

getIsTotalRecordKnown

public boolean getIsTotalRecordKnown()
Description copied from interface: ICursor

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.

Specified by:
getIsTotalRecordKnown in interface ICursor
Returns:
true if the total record count is known.

getRecordCount

public int getRecordCount(FetchedRecordCountInfo info)
Since this method also needs to return info indicating if all the records have been retrieved, include the FetchedRecordCountInfo structure.

Specified by:
getRecordCount in interface ICursor
Parameters:
info - A FetchedRecordCountInfo object containing key properties of the fetched records.
Returns:
int

getRowset

public IRowset getRowset()

Returns the records that contain the search results fetched from the server.

Returns:
An IRowset object containing the records that contain search results fetched from the server.

getRowsetMetaData

public IRowsetMetaData getRowsetMetaData()

Returns information about the fields that the items in the record correspond to. The IRowsetMetaData object contains the fields whose values will be returned. These fields, which are specified in the createCursor method, determine the columns that are available in the search result rowset.

Returns:
An IRowsetMetaData object containing information about the fields that the items in the record correspond to.

isEOF

public boolean isEOF()
              throws ReportSDKException

Returns true if the cursor is past end of rowset or before beginning, and false otherwise.

Specified by:
isEOF in interface ICursor
Returns:
true if the cursor is past end of rowset or before beginning, and false otherwise.
Throws:
ReportSDKException

moveFirst

public void moveFirst()
               throws ReportSDKException
Description copied from interface: ICursor

Moves the cursor to the first record in the batch.

Specified by:
moveFirst in interface ICursor
Throws:
ReportSDKException

moveLast

public void moveLast()
              throws ReportSDKException
Description copied from interface: ICursor

Moves the cursor to the last record in the batch.

Specified by:
moveLast in interface ICursor
Throws:
ReportSDKException

moveNext

public boolean moveNext()
                 throws ReportSDKException
Description copied from interface: ICursor

Moves to the next record in the batch.

Specified by:
moveNext in interface ICursor
Returns:
FALSE if already hits the last record
Throws:
ReportSDKException

movePrevious

public boolean movePrevious()
                     throws ReportSDKException
Description copied from interface: ICursor

Moves to the previous record in the batch.

Specified by:
movePrevious in interface ICursor
Returns:
FALSE if already hits the first record
Throws:
ReportSDKException

moveTo

public boolean moveTo(int index)
               throws ReportSDKException
Description copied from interface: ICursor

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

Specified by:
moveTo in interface ICursor
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