|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.sdk.occa.report.application.RowsetCursor
public class RowsetCursor
This object provides easy access to records in a rowset. Create the cursor with the
RowsetController
object's createCursor
method.
Method Summary | |
---|---|
void |
addNew()
Reserved for future use. |
void |
delete()
Reserved for future use. |
Record |
getCurrentRecord()
Returns the current record value. |
int |
getCurrentRecordNumber()
Returns the record number of the current cursor position. |
IGroupPath |
getGroupPath()
Returns the group path used to create the rowset cursor. |
boolean |
getIsTotalRecordKnown()
Returns true if the total number of records is known, and false
otherwise. |
RowsetMetaData |
getMetaData()
Returns the meta data used to create the rowset cursor. |
int |
getNumOfCachedBatches()
Returns the number of batches cached in the rowset. |
int |
getRecordCount(FetchedRecordCountInfo info)
Returns the number of records in the record batch. |
Rowset |
getRowset()
Returns the records fetched from the server. |
RowsetController |
getRowsetController()
Returns the RowsetController object that created this rowset cursor. |
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. |
void |
setNumOfCachedBatches(int val)
Sets the default number of rowset batches that will be cached in the RowsetCursor . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void addNew()
ICursor
Reserved for future use.
addNew
in interface ICursor
public void delete()
ICursor
Reserved for future use.
delete
in interface ICursor
public Record getCurrentRecord()
Returns the current record value.
getCurrentRecord
in interface ICursor
Record
object.public int getCurrentRecordNumber() throws ReportSDKException
ICursor
Returns the record number of the current cursor position.
getCurrentRecordNumber
in interface ICursor
int
that specifies the record number of the current cursor position.
ReportSDKException
public IGroupPath getGroupPath()
Returns the group path used to create the rowset cursor.
GroupPath
object used to create this rowset cursor.public boolean getIsTotalRecordKnown()
ICursor
Returns true
if the total number of records is known, and false
otherwise.
Under certain circumstances, the total record count is not known:
true
, then the value of the getRecordCount
method is the final total number of records.
getIsTotalRecordKnown
in interface ICursor
true
if the total number of records is known, and false
otherwise.public RowsetMetaData getMetaData()
Returns the meta data used to create the rowset cursor.
RowsetMetaData
object used to create this rowset cursor.public int getNumOfCachedBatches()
Returns the number of batches cached in the rowset.
This property overrides the number inherited from the RowsetController
object's
NumOfCachedBatches property.
Use this property to navigate a rowset. For example, suppose that RowsetBatchSize is 100, RecordCount is 500, and NumOfCachedBatches is 2.
int
that specifies the number of batches cached in the rowset.setNumOfCachedBatches(int)
public int getRecordCount(FetchedRecordCountInfo info)
ICursor
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.
getRecordCount
in interface ICursor
info
- A FetchedRecordCountInfo
object containing key properties of the fetched
records.
int
that specifies the number of records in the batch.public Rowset getRowset() throws ReportSDKException
Returns the records fetched from the server.
Rowset
object containing the records fetched from the server.
ReportSDKException
public RowsetController getRowsetController()
Returns the RowsetController
object that created this rowset cursor.
RowsetController
object that created this rowset cursor.public boolean isEOF()
ICursor
Returns true
if the cursor points to the last record, false
otherwise.
isEOF
in interface ICursor
true
if the cursor points to the last record, false
otherwise.public void moveFirst() throws ReportSDKException
ICursor
Moves the cursor to the first record in the batch.
moveFirst
in interface ICursor
ReportSDKException
public void moveLast() throws ReportSDKException
ICursor
Moves the cursor to the last record in the batch.
moveLast
in interface ICursor
ReportSDKException
public boolean moveNext() throws ReportSDKException
ICursor
Moves to the next record in the batch.
moveNext
in interface ICursor
true
if the cursor advanced successfully, and false
if the
cursor already points to the last record in the batch.
ReportSDKException
public boolean movePrevious() throws ReportSDKException
ICursor
Moves to the previous record in the batch.
movePrevious
in interface ICursor
true
if the cursor advanced successfully, and false
if the
cursor already points to the first record in the batch.
ReportSDKException
public boolean moveTo(int index) throws ReportSDKException
ICursor
Moves to a specified record in the batch. If you supply an index that is out of bounds the method will fail.
moveTo
in interface ICursor
index
- The index of the record in the batch. The batch is zero-based.
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.
ReportSDKException
public void setNumOfCachedBatches(int val) throws ReportSDKException
Sets the default number of rowset batches that will be cached in the RowsetCursor
.
The RowsetCursor
object created by createCursor
method inherits this number. The default value is -1, which means that all batches will be
cached. If you are iterating through a large data set, you may want to set this value to a
positive integer. For example, if you set the value to 2, then only two batches will be kept
in memory.
val
- The number of rowset batches that will be cached in the
RowsetCursor
.
ReportSDKException
getNumOfCachedBatches()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |