public class WindowedMemoryResultSet extends java.lang.Object implements MemoryResultSet
MemoryResultSet providing a window for accessing the rows. This
allows to restrict access to only specific consecutive rows. The window only applies to rows, there are no restrictions on columns.
| Modifier and Type | Field and Description |
|---|---|
protected int |
firstRow
The first row in the wrapped result set being part of the window.
|
protected MemoryResultSet |
resultSet
The wrapped result set.
|
protected int |
rowCount
The amount of rows within the windows.
|
| Constructor and Description |
|---|
WindowedMemoryResultSet(MemoryResultSet resultSet,
int firstRow,
int rowCount)
Creates a new
WindowedMemoryResultSet wrapping the designated
MemoryResultSet and only allowing access to the rows starting with the designated
first row and for the designated count (or the maximum amount of rows in the designated result
set, whichever is less). |
| Modifier and Type | Method and Description |
|---|---|
int |
getColumnCount()
Gets the amount of columns of this memory result set.
|
java.lang.String |
getColumnLabel(int column)
Gets the label for the designated column.
|
ProcessConstants.AdeptDataType |
getColumnType(int column)
Gets the data type for the designated column.
|
int |
getRowCount()
Gets the amount of rows of this memory result set.
|
java.io.Serializable[] |
getValues(int row)
Gets the values for the designated rows.
|
protected final MemoryResultSet resultSet
protected final int firstRow
protected final int rowCount
public WindowedMemoryResultSet(MemoryResultSet resultSet, int firstRow, int rowCount)
WindowedMemoryResultSet wrapping the designated
MemoryResultSet and only allowing access to the rows starting with the designated
first row and for the designated count (or the maximum amount of rows in the designated result
set, whichever is less).resultSet - The result set to be wrapped for providing restricted row access.firstRow - The first row which to provide via the created windowed result set based on the
wrapped result set.rowCount - The amount of rows of the window. This will be reduced if the designated result
set does not have enough rows.public int getColumnCount()
MemoryResultSetgetColumnCount in interface MemoryResultSetpublic int getRowCount()
MemoryResultSetgetRowCount in interface MemoryResultSetpublic java.lang.String getColumnLabel(int column)
MemoryResultSetMemoryResultSet.getColumnCount().getColumnLabel in interface MemoryResultSetcolumn - The column for which to get the label.public ProcessConstants.AdeptDataType getColumnType(int column)
MemoryResultSetMemoryResultSet.getColumnCount().getColumnType in interface MemoryResultSetcolumn - The column for which to get the data type.public java.io.Serializable[] getValues(int row)
MemoryResultSetMemoryResultSet.getRowCount(). The values in the array are of the Java-type
corresponding to the ProcessConstants.AdeptDataType of the corresponding column.
null represents a usual null.getValues in interface MemoryResultSetrow - The row for which to get the values.