All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface javax.infobus.ScrollableRowsetAccess

public interface ScrollableRowsetAccess
extends RowsetAccess
DataItems that implement the ScrollableRowsetAcess interface represent a set of rows that may be naviagated backwards or forwards. The ScrollableRowsetAccess interface contains methods to get a new cursor, to set and get the number of rows to be locally buffered, to go to the first/last/previous/specified row, and to get the number of rows.

Version:
$Revision: 1.11 $

Method Index

 o absolute(int)
Set the row cursor to the specified row If there are changes to the current row pending, the producer may validate the changes and/or send them to the database before changing the cursor.
 o first()
Move the row cursor to the first row.
 o getBufferSize()
Get the current buffer size.
 o getRow()
Get the row number of the current row.
 o getRowCount()
Get the total number of rows in the rowset.
 o last()
Move the row cursor to the last row.
 o newCursor()
Get a new, independent cursor for the rowset.
 o previous()
Move the row cursor to the previous row.
 o relative(int)
Move the row cursor forwards or backwards by the specified number of rows.
 o setBufferSize(int)
Ask the data provider to keep a specified number of rows immediately available.

Methods

 o newCursor
 public abstract ScrollableRowsetAccess newCursor()
Get a new, independent cursor for the rowset.

Returns:
a new ScrollableRowsetAccess object having the same underlying set of rows
 o setBufferSize
 public abstract void setBufferSize(int size)
Ask the data provider to keep a specified number of rows immediately available. Does nothing if not supported.

Parameters:
size - number of rows to keep immediately available.
 o getBufferSize
 public abstract int getBufferSize()
Get the current buffer size. If the provider does not support setting the buffer this, this will be 1.

Returns:
current buffere size.
 o previous
 public abstract boolean previous() throws SQLException, RowsetValidationException
Move the row cursor to the previous row. If there are changes to the current row pending, the producer may validate the changes and/or send them to the database before changing the cursor.

Returns:
true if there is a previous row, false otherwise.
Throws: SQLException
if the backend rejects the changes
Throws: RowsetValidationException
if the changes are invalid
 o first
 public abstract boolean first() throws SQLException, RowsetValidationException
Move the row cursor to the first row. If there are changes to the current row pending, the producer may validate the changes and/or send them to the database before changing the cursor.

Returns:
true if there is a first row, false if there are no rows.
Throws: SQLException
if the backend rejects the changes
Throws: RowsetValidationException
if the changes are invalid
 o last
 public abstract boolean last() throws SQLException, RowsetValidationException
Move the row cursor to the last row. If there are changes to the current row pending, the producer may validate the changes and/or send them to the database before changing the cursor.

Returns:
true if there is a last row, false if there are no rows.
Throws: SQLException
if the backend rejects the changes
Throws: RowsetValidationException
if the changes are invalid
 o relative
 public abstract boolean relative(int numRows) throws SQLException, RowsetValidationException
Move the row cursor forwards or backwards by the specified number of rows. If there are changes to the current row pending, the producer may validate the changes and/or send them to the database before changing the cursor.

Parameters:
numRows - the number of rows to move forward (backwards if negative).
Returns:
true if the specified row exists, false otherwise.
Throws: SQLException
if the backend rejects the changes
Throws: RowsetValidationException
if the changes are invalid
 o getRow
 public abstract int getRow()
Get the row number of the current row.

Returns:
a number greater than 0 if there is a current row, else 0.
 o getRowCount
 public abstract int getRowCount()
Get the total number of rows in the rowset.

Returns:
number of rows
 o absolute
 public abstract boolean absolute(int rowIndex) throws SQLException, RowsetValidationException
Set the row cursor to the specified row If there are changes to the current row pending, the producer may validate the changes and/or send them to the database before changing the cursor.

Parameters:
rowIndex - the number of the row as returned by getRow.
Returns:
true if the specified row exisits, false otherwise.
Throws: SQLException
if the backend rejects the changes
Throws: RowsetValidationException
if the changes are invalid

All Packages  Class Hierarchy  This Package  Previous  Next  Index