public abstract class CASTableCursorSupport extends CASBaseTable
CASBaseTable.StreamAppender, CASBaseTable.StringAppender, CASBaseTable.StringBufferAppender
CASTable.OutputType
Modifier and Type | Field and Description |
---|---|
protected int |
cursor |
DEFAULT_TOSTRING_ROWCOUNT, rb
HINT_PRESERVE_PADDING
Constructor and Description |
---|
CASTableCursorSupport() |
Modifier and Type | Method and Description |
---|---|
boolean |
absolute(int row)
Moves the cursor to the given row number.
|
void |
afterLast()
Moves the cursor to the end of this table, just after the last row.
|
void |
beforeFirst()
Moves the cursor to the front of this table, just before the first row.
|
protected abstract void |
closeCheck()
Checks if the table (provider) has been closed.
|
protected void |
cursorCheck() |
boolean |
first()
Moves the cursor to the first row in the table.
|
java.math.BigDecimal |
getBigDecimalAt(int col)
Gets the big decimal value at the current cursor position for the given column.
|
java.io.InputStream |
getBinaryStreamAt(int col)
Gets an input stream of uninterpreted bytes at the current cursor position for the given column.
|
byte[] |
getBytesAt(int col)
Gets a byte array value at the current cursor position for the given column.
|
int |
getCursor()
Gets the current cursor position in the table.
|
double[] |
getDoubleArrayAt(int col)
Gets the double array value at the current cursor position for the given column index.
|
double[] |
getDoubleArrayAt(int col,
int offset,
int length)
Gets the double array value at the current cursor position for the given column index.
|
double |
getDoubleAt(int col)
Gets the double value at the current cursor position for the given column index.
|
int |
getIntAt(int col)
Gets the integer value at the current cursor position for the given column.
|
long |
getLongAt(int col)
Gets the long value at the current cursor position for the given column.
|
java.lang.Object |
getObjectAt(int col)
Gets the raw object value at the current cursor for the given column.
|
java.lang.String |
getStringAt(int col)
Gets a string value at the current cursor position for the given column.
|
protected boolean |
isValidRow() |
boolean |
last()
Moves the cursor to the last row in the table.
|
boolean |
next()
Moves the cursor forward one row from its current position.
|
boolean |
previous()
Moves the cursor back one row from its current position.
|
addHint, addRowInfo, escapeForCSV, findColumn, getActionOptions, getBigDecimalAt, getBigDecimalAt, getBinaryStreamAt, getBinaryStreamAt, getBytesAt, getBytesAt, getColumnIndex, getColumnLabels, getColumnNames, getDateAt, getDateAt, getDateAt, getDateAt, getDateAt, getDateAt, getDateTimeAt, getDateTimeAt, getDateTimeAt, getDateTimeAt, getDateTimeAt, getDateTimeAt, getDoubleArrayAt, getDoubleArrayAt, getDoubleArrayAt, getDoubleArrayAt, getDoubleAt, getDoubleAt, getHints, getIntAt, getIntAt, getLongAt, getLongAt, getObjectAt, getObjectAt, getStringAt, getStringAt, getTimeAt, getTimeAt, getTimeAt, getTimeAt, getTimeAt, getTimeAt, leftPad, rightPad, setActionOptions, setHints, toAppender, toCSVString, toPrettyString, toStream, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addHint, close, getActualRowCount, getBigDecimalAt, getBinaryStreamAt, getBytesAt, getColumnCount, getColumns, getDateAt, getDateAt, getDateTimeAt, getDateTimeAt, getDoubleArrayAt, getDoubleArrayAt, getDoubleAt, getFlags, getHints, getIntAt, getLabel, getLongAt, getName, getObjectAt, getRow, getRow, getRowCount, getRowSize, getSize, getStringAt, getTimeAt, getTimeAt, getTitle, getUserFlags, getUserValue, isDataLittleEndian, setHints, setLabel, setName, setTitle, setUserFlags, setUserValue
getAttribute, getAttributeCount, getAttributeKeys
public int getCursor() throws java.io.IOException
CASTable
java.io.IOException
public boolean next() throws java.io.IOException
CASTable
When a call to next returns false, the cursor is positioned after the last row.
java.io.IOException
public boolean previous() throws java.io.IOException
CASTable
When a call to previous returns false, the cursor is positioned before the first row.
java.io.IOException
public boolean absolute(int row) throws java.io.IOException
CASTable
An attempt to position the cursor beyond the first or last row in the table leaves the cursor before the first row.
row
- The absolute row number, 0-based.java.io.IOException
public boolean first() throws java.io.IOException
CASTable
java.io.IOException
public void beforeFirst() throws java.io.IOException
CASTable
java.io.IOException
public boolean last() throws java.io.IOException
CASTable
java.io.IOException
public void afterLast() throws java.io.IOException
CASTable
java.io.IOException
public double getDoubleAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
public double[] getDoubleArrayAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
public double[] getDoubleArrayAt(int col, int offset, int length) throws java.io.IOException
CASTable
col
- The column number, 0-basedoffset
- The starting offset of the arraylength
- The number of elements to returnjava.io.IOException
public int getIntAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
public long getLongAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
public java.math.BigDecimal getBigDecimalAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
public java.lang.String getStringAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
public byte[] getBytesAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
public java.io.InputStream getBinaryStreamAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
public java.lang.Object getObjectAt(int col) throws java.io.IOException
CASTable
col
- The column number, 0-basedjava.io.IOException
protected boolean isValidRow()
protected abstract void closeCheck() throws java.io.IOException
java.io.IOException
protected void cursorCheck()