public class RandomResultSetStarTable extends RandomStarTable
ResultSet
.
Such results sets have a type
of
ResultSet.TYPE_SCROLL_*
and are generally produced from
by using a Statement which has been constructed using corresponding type.
This implementation is thread-safe.Constructor and Description |
---|
RandomResultSetStarTable(ResultSet rset)
Constructor.
|
RandomResultSetStarTable(StarResultSet srset)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
The
AbstractStarTable implementation of this method
does nothing. |
Object |
getCell(long lrow,
int icol)
Implementations of this method must be safe for concurrent calls
from multiple threads.
|
List<ValueInfo> |
getColumnAuxDataInfos()
Goes through the table columns (
ColumnInfo objects)
and picks out all the AuxData items which exist, generalising
where necessary and returning a union of them in
alphabetical order by name. |
int |
getColumnCount()
Returns the number of columns in this table.
|
ColumnInfo |
getColumnInfo(int icol)
Returns the object describing the data in a given column.
|
ResultSet |
getResultSet()
Returns the result set on which this table is built.
|
Object[] |
getRow(long lrow)
The
AbstractStarTable implementation of this method
constructs a row by repeated invocation of AbstractStarTable.getCell(long, int) . |
long |
getRowCount()
Implementations must supply a non-negative return value.
|
getRowAccess, getRowSequence, isRandom
checkedLongToInt, getName, getParameters, getRowSplittable, getURL, setName, setParameters, setURL
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameterByName, setParameter
public RandomResultSetStarTable(ResultSet rset) throws SQLException
rset
- result set containing dataIllegalArgumentException
- if rset
is not
random accessSQLException
public RandomResultSetStarTable(StarResultSet srset)
srset
- result set containing dataIllegalArgumentException
- if srset
is not
random accesspublic ResultSet getResultSet()
public int getColumnCount()
StarTable
getColumnCount
in interface StarTable
getColumnCount
in class AbstractStarTable
public ColumnInfo getColumnInfo(int icol)
StarTable
getColumnInfo
in interface StarTable
getColumnInfo
in class AbstractStarTable
icol
- the column for which header information is requiredicol
public long getRowCount()
RandomStarTable
getRowCount
in interface StarTable
getRowCount
in class RandomStarTable
public List<ValueInfo> getColumnAuxDataInfos()
AbstractStarTable
ColumnInfo
objects)
and picks out all the AuxData items which exist, generalising
where necessary and returning a union of them in
alphabetical order by name.
Subclasses should override this if they can do better, for instance
providing an order for the keys.getColumnAuxDataInfos
in interface StarTable
getColumnAuxDataInfos
in class AbstractStarTable
ValueInfo
items which in fact crop up in column metadataDefaultValueInfo.getAuxData()
public Object getCell(long lrow, int icol) throws IOException
RandomStarTable
getCell
in interface StarTable
getCell
in class RandomStarTable
lrow
- the index of the cell's rowicol
- the index of the cell's columnIOException
- if there is an error reading the datapublic Object[] getRow(long lrow) throws IOException
AbstractStarTable
AbstractStarTable
implementation of this method
constructs a row by repeated invocation of AbstractStarTable.getCell(long, int)
.getRow
in interface StarTable
getRow
in class AbstractStarTable
lrow
- the index of the row to retrieveirow
IOException
- if there is an error reading the datapublic void close() throws IOException
AbstractStarTable
AbstractStarTable
implementation of this method
does nothing.close
in interface Closeable
close
in interface AutoCloseable
close
in interface StarTable
close
in class AbstractStarTable
IOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.