com.crystaldecisions.sdk.occa.report.data
Class CompositeCursor

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by com.crystaldecisions.sdk.occa.report.lib.ClonableList<E>
                  extended by com.crystaldecisions.sdk.occa.report.lib.ControllableList<E>
                      extended by com.crystaldecisions.sdk.occa.report.lib.ReportSDKVector<ICursor>
                          extended by com.crystaldecisions.sdk.occa.report.data.CompositeCursor
All Implemented Interfaces:
ICursor, IClone, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<ICursor>, java.util.Collection<ICursor>, java.util.List<ICursor>, java.util.RandomAccess

public class CompositeCursor
extends ReportSDKVector<ICursor>
implements ICursor

This object is used when there are multiple cursors. Cursors are 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.

See Also:
Serialized Form

Constructor Summary
CompositeCursor()
           
CompositeCursor(CompositeCursor src)
           
 
Method Summary
 void addNew()
           Reserved for future use.
 void delete()
           Reserved for future use.
 int getActiveCursorIndex()
          Returns the index value for the active cursor.
 Record getCurrentRecord()
           The record the cursor is currently pointing at.
 int getCurrentRecordNumber()
           Returns the record number of the current cursor position.
 int getCurrentRecordNumber(FetchedRecordCountInfo info)
          Returns the current record number.
 boolean getIsTotalRecordKnown()
           Returns true if the total number of records is known, and false otherwise.
 int getRecordCount(FetchedRecordCountInfo info)
          Returns the record number of the current cursor position.
 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.
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ReportSDKVector
add, add, addElement, elementAt, insertElementAt, isDirectlyControllable, removeAllElements
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ControllableList
addAll, addAll, clear, copyTo, doControllerModification, enumerateMembers, getControllableMixin, iterator, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ClonableList
clone, createMember, endElement, findIndexOf, hasContent, readElement, save, save, saveContents, startElement
 
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode
 

Constructor Detail

CompositeCursor

public CompositeCursor(CompositeCursor src)

CompositeCursor

public CompositeCursor()
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

getActiveCursorIndex

public int getActiveCursorIndex()

Returns the index value for the active cursor.

Returns:
The index value of the active cursor as an int.

getCurrentRecord

public Record getCurrentRecord()
                        throws ReportSDKException
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.
Throws:
ReportSDKException

getCurrentRecordNumber

public int getCurrentRecordNumber()
                           throws ReportSDKException
Description copied from interface: ICursor

Returns the record number of the current cursor position.

Specified by:
getCurrentRecordNumber in interface ICursor
Returns:
An int that specifies the record number of the current cursor position.
Throws:
ReportSDKException

getCurrentRecordNumber

public int getCurrentRecordNumber(FetchedRecordCountInfo info)
                           throws ReportSDKException

Returns the current record number.

Parameters:
info - The FetchedRecordCountInfo object.
Returns:
The current record number as an int.
Throws:
ReportSDKException

getIsTotalRecordKnown

public boolean getIsTotalRecordKnown()
                              throws ReportSDKException
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 number of records is known, and false otherwise.
Throws:
ReportSDKException

getRecordCount

public int getRecordCount(FetchedRecordCountInfo info)
                   throws ReportSDKException

Returns the record number of the current cursor position. when a FetchedRecordCountInfo object is specified.

Specified by:
getRecordCount in interface ICursor
Parameters:
info - The FetchedRecordCountInfo object.
Returns:
The record number of the current cursor position as an int.
Throws:
ReportSDKException

isEOF

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

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

Specified by:
isEOF in interface ICursor
Returns:
true if the cursor points to the last record, 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:
true if the cursor advanced successfully, and false if the cursor already points to the last record in the batch.
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:
true if the cursor advanced successfully, and false if the cursor already points to the first record in the batch.
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