|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.table.AbstractStarTable
uk.ac.starlink.table.jdbc.SequentialResultSetStarTable
public class SequentialResultSetStarTable
StarTable implementation based on a ResultSet
.
It can read through the data once, and no more.
Beware: it therefore breaks the general contract of
StarTable
, in that calls of
getRowSequence()
after the first one will throw a
UnrepeatableSequenceException
.
Only use this class if you know that the table needs to be read once only.
Constructor Summary | |
---|---|
SequentialResultSetStarTable(java.sql.ResultSet rset)
Constructor. |
|
SequentialResultSetStarTable(StarResultSet srset)
Constructs from a StarResultSet. |
Method Summary | |
---|---|
java.util.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. |
java.sql.ResultSet |
getResultSet()
Returns the result set on which this table is built. |
long |
getRowCount()
Returns the number of rows in this table, if known. |
RowSequence |
getRowSequence()
The first time it is called, returns an iterator over the rows of the result set. |
Methods inherited from class uk.ac.starlink.table.AbstractStarTable |
---|
checkedLongToInt, getCell, getName, getParameterByName, getParameters, getRow, getURL, isRandom, setName, setParameter, setParameters, setURL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequentialResultSetStarTable(java.sql.ResultSet rset) throws java.sql.SQLException
rset
- result set containing data - should be positioned at start
java.sql.SQLException
public SequentialResultSetStarTable(StarResultSet srset)
srset
- result set containing data - should be positioned at startMethod Detail |
---|
public java.sql.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 required
public long getRowCount()
StarTable
getRowCount
in interface StarTable
getRowCount
in class AbstractStarTable
public java.util.List<ValueInfo> getColumnAuxDataInfos()
AbstractStarTable
getColumnAuxDataInfos
in interface StarTable
getColumnAuxDataInfos
in class AbstractStarTable
ColumnInfo.getAuxData()
public RowSequence getRowSequence() throws UnrepeatableSequenceException, java.io.IOException
UnrepeatableSequenceException
.
getRowSequence
in interface StarTable
getRowSequence
in class AbstractStarTable
UnrepeatableSequenceException
- if called more than once
java.io.IOException
- if there is an error providing access
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |