com.arsdigita.acs
Interface MultiDataSource

All Superinterfaces:
DataSource
All Known Implementing Classes:
SeekableSelection, Selection

public interface MultiDataSource
extends DataSource

An API for iterating over multi-item DataSources. The methods inherited from DataSource (get, contains) deal return values pertinent to the currently active item; the next method is used for iterating over the items in the datasource.


Field Summary
static java.lang.String cvsId
           
 
Method Summary
 boolean next()
          Advances to the next item, if there is one, and returns true; returns false otherwise.
 int rowcount()
          Returns the total number of rows in the datasource.
 int rownum()
          Returns the current row number in the datasource.
 void seek(int rownum)
          Sets the current row to the given number.
 
Methods inherited from interface com.arsdigita.acs.DataSource
contains, get, keys
 

Field Detail

cvsId

public static final java.lang.String cvsId
Method Detail

next

public boolean next()
             throws DataSourceException
Advances to the next item, if there is one, and returns true; returns false otherwise.

rownum

public int rownum()
           throws DataSourceException
Returns the current row number in the datasource.

rowcount

public int rowcount()
             throws DataSourceException
Returns the total number of rows in the datasource.

seek

public void seek(int rownum)
          throws DataSourceException
Sets the current row to the given number. The initial value, before next() is called, is -1, so you need to seek(-1) if you want to reset the datasource to its initial state.