jimm.datavision.source
Class DataCursor
java.lang.Object
jimm.datavision.source.DataCursor
- Direct Known Subclasses:
- CharSepRow, MockAggregateDataCursor, MockDataCursor, ObjectRow, ResultSetRow
public abstract class DataCursor
- extends java.lang.Object
Represents a row of data. Provides the interface needed by
Report
, no more. When using JDBC, this is a wrapper around
a ResultSet
.
The only method subclasses must implement is
readRowData()
.
- Author:
- Jim Menard, jimm@io.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currRowNumber
protected int currRowNumber
prevRowData
protected java.util.List prevRowData
currRowData
protected java.util.List currRowData
nextRowData
protected java.util.List nextRowData
lastRowData
protected java.util.List lastRowData
lastRowNumber
protected int lastRowNumber
DataCursor
public DataCursor()
isFirst
public boolean isFirst()
isLast
public boolean isLast()
next
public boolean next()
previous
public boolean previous()
last
public boolean last()
getRow
public int getRow()
close
public void close()
getObject
public java.lang.Object getObject(int index)
- Returns the object in the specified column. index starts
at 1.
Even when running a report, currRowData is not always
defined. For example, when a query returns zero rows but a column field
is in some header or footer, this method is called but
currRowData is null
. If it is, we return
null
.
- Returns:
- the object in the index'th column, or
null
if no data has yet been read
readRowData
protected abstract java.util.List readRowData()