public interface SqlRowSet
extends java.io.Serializable
javax.sql.RowSet, representing
disconnected java.sql.ResultSet data.
The main difference to the standard JDBC RowSet is that an SQLException
is never thrown here. This allows a SqlRowSet to be used without having
to deal with checked exceptions. A SqlRowSet will throw Spring's
org.springframework.jdbc.InvalidResultSetAccessException
instead (when appropriate).
Note: This interface extends the java.io.Serializable
marker interface. Implementations, which typically hold disconnected data,
are encouraged to be actually serializable (as far as possible).
RowSet,
ResultSet,
InvalidResultSetAccessException,
JdbcTemplate.queryForRowSet(java.lang.String)| Modifier and Type | Method and Description |
|---|---|
boolean |
absolute(int row)
Moves the cursor to the given row number in the RowSet, just after the last row.
|
void |
afterLast()
Moves the cursor to the end of this RowSet.
|
void |
beforeFirst()
Moves the cursor to the front of this RowSet, just before the first row.
|
int |
findColumn(java.lang.String columnLabel)
Maps the given column label to its column index.
|
boolean |
first()
Moves the cursor to the first row of this RowSet.
|
java.math.BigDecimal |
getBigDecimal(int columnIndex)
Retrieves the value of the indicated column in the current row as
an BigDecimal object.
|
java.math.BigDecimal |
getBigDecimal(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
an BigDecimal object.
|
boolean |
getBoolean(int columnIndex)
Retrieves the value of the indicated column in the current row as
a boolean.
|
boolean |
getBoolean(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a boolean.
|
byte |
getByte(int columnIndex)
Retrieves the value of the indicated column in the current row as
a byte.
|
byte |
getByte(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a byte.
|
java.sql.Date |
getDate(int columnIndex)
Retrieves the value of the indicated column in the current row as
a Date object.
|
java.sql.Date |
getDate(int columnIndex,
java.util.Calendar cal)
Retrieves the value of the indicated column in the current row as
a Date object.
|
java.sql.Date |
getDate(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a Date object.
|
java.sql.Date |
getDate(java.lang.String columnLabel,
java.util.Calendar cal)
Retrieves the value of the indicated column in the current row as
a Date object.
|
double |
getDouble(int columnIndex)
Retrieves the value of the indicated column in the current row as
a Double object.
|
double |
getDouble(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a Double object.
|
float |
getFloat(int columnIndex)
Retrieves the value of the indicated column in the current row as
a float.
|
float |
getFloat(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a float.
|
int |
getInt(int columnIndex)
Retrieves the value of the indicated column in the current row as
an int.
|
int |
getInt(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
an int.
|
long |
getLong(int columnIndex)
Retrieves the value of the indicated column in the current row as
a long.
|
long |
getLong(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a long.
|
SqlRowSetMetaData |
getMetaData()
Retrieves the meta data (number, types and properties for the columns)
of this row set.
|
java.lang.Object |
getObject(int columnIndex)
Retrieves the value of the indicated column in the current row as
an Object.
|
java.lang.Object |
getObject(int columnIndex,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
Retrieves the value of the indicated column in the current row as
an Object.
|
java.lang.Object |
getObject(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
an Object.
|
java.lang.Object |
getObject(java.lang.String columnLabel,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
Retrieves the value of the indicated column in the current row as
an Object.
|
int |
getRow()
Retrieves the current row number.
|
short |
getShort(int columnIndex)
Retrieves the value of the indicated column in the current row as
a short.
|
short |
getShort(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a short.
|
java.lang.String |
getString(int columnIndex)
Retrieves the value of the indicated column in the current row as
a String.
|
java.lang.String |
getString(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a String.
|
java.sql.Time |
getTime(int columnIndex)
Retrieves the value of the indicated column in the current row as
a Time object.
|
java.sql.Time |
getTime(int columnIndex,
java.util.Calendar cal)
Retrieves the value of the indicated column in the current row as
a Time object.
|
java.sql.Time |
getTime(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a Time object.
|
java.sql.Time |
getTime(java.lang.String columnLabel,
java.util.Calendar cal)
Retrieves the value of the indicated column in the current row as
a Time object.
|
java.sql.Timestamp |
getTimestamp(int columnIndex)
Retrieves the value of the indicated column in the current row as
a Timestamp object.
|
java.sql.Timestamp |
getTimestamp(int columnIndex,
java.util.Calendar cal)
Retrieves the value of the indicated column in the current row as
a Timestamp object.
|
java.sql.Timestamp |
getTimestamp(java.lang.String columnLabel)
Retrieves the value of the indicated column in the current row as
a Timestamp object.
|
java.sql.Timestamp |
getTimestamp(java.lang.String columnLabel,
java.util.Calendar cal)
Retrieves the value of the indicated column in the current row as
a Timestamp object.
|
boolean |
isAfterLast()
Retrieves whether the cursor is after the last row of this RowSet.
|
boolean |
isBeforeFirst()
Retrieves whether the cursor is after the first row of this RowSet.
|
boolean |
isFirst()
Retrieves whether the cursor is on the first row of this RowSet.
|
boolean |
isLast()
Retrieves whether the cursor is on the last row of this RowSet.
|
boolean |
last()
Moves the cursor to the last row of this RowSet.
|
boolean |
next()
Moves the cursor to the next row.
|
boolean |
previous()
Moves the cursor to the previous row.
|
boolean |
relative(int rows)
Moves the cursor a relative number f rows, either positive or negative.
|
boolean |
wasNull()
Reports whether the last column read had a value of SQL
NULL. |
SqlRowSetMetaData getMetaData()
ResultSet.getMetaData()int findColumn(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the name of the columnInvalidResultSetAccessExceptionResultSet.findColumn(String)java.math.BigDecimal getBigDecimal(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getBigDecimal(int)java.math.BigDecimal getBigDecimal(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getBigDecimal(java.lang.String)boolean getBoolean(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getBoolean(int)boolean getBoolean(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getBoolean(java.lang.String)byte getByte(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getByte(int)byte getByte(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getByte(java.lang.String)java.sql.Date getDate(int columnIndex,
java.util.Calendar cal)
throws InvalidResultSetAccessException
columnIndex - the column indexcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getDate(int, java.util.Calendar)java.sql.Date getDate(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getDate(int)java.sql.Date getDate(java.lang.String columnLabel,
java.util.Calendar cal)
throws InvalidResultSetAccessException
columnLabel - the column labelcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getDate(java.lang.String, java.util.Calendar)java.sql.Date getDate(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getDate(java.lang.String)double getDouble(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getDouble(int)double getDouble(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getDouble(java.lang.String)float getFloat(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getFloat(int)float getFloat(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getFloat(java.lang.String)int getInt(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getInt(int)int getInt(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getInt(java.lang.String)long getLong(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getLong(int)long getLong(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getLong(java.lang.String)java.lang.Object getObject(int columnIndex,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws InvalidResultSetAccessException
columnIndex - the column indexmap - a Map object containing the mapping from SQL types to Java typesInvalidResultSetAccessExceptionResultSet.getObject(int, java.util.Map)java.lang.Object getObject(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getObject(int)java.lang.Object getObject(java.lang.String columnLabel,
java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws InvalidResultSetAccessException
columnLabel - the column labelmap - a Map object containing the mapping from SQL types to Java typesInvalidResultSetAccessExceptionResultSet.getObject(java.lang.String, java.util.Map)java.lang.Object getObject(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getObject(java.lang.String)short getShort(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getShort(int)short getShort(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getShort(java.lang.String)java.lang.String getString(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getString(int)java.lang.String getString(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getString(java.lang.String)java.sql.Time getTime(int columnIndex,
java.util.Calendar cal)
throws InvalidResultSetAccessException
columnIndex - the column indexcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getTime(int, java.util.Calendar)java.sql.Time getTime(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getTime(int)java.sql.Time getTime(java.lang.String columnLabel,
java.util.Calendar cal)
throws InvalidResultSetAccessException
columnLabel - the column labelcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getTime(java.lang.String, java.util.Calendar)java.sql.Time getTime(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getTime(java.lang.String)java.sql.Timestamp getTimestamp(int columnIndex,
java.util.Calendar cal)
throws InvalidResultSetAccessException
columnIndex - the column indexcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getTimestamp(int, java.util.Calendar)java.sql.Timestamp getTimestamp(int columnIndex)
throws InvalidResultSetAccessException
columnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getTimestamp(int)java.sql.Timestamp getTimestamp(java.lang.String columnLabel,
java.util.Calendar cal)
throws InvalidResultSetAccessException
columnLabel - the column labelcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getTimestamp(java.lang.String, java.util.Calendar)java.sql.Timestamp getTimestamp(java.lang.String columnLabel)
throws InvalidResultSetAccessException
columnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getTimestamp(java.lang.String)boolean absolute(int row)
throws InvalidResultSetAccessException
row - the number of the row where the cursor should moveInvalidResultSetAccessExceptionResultSet.absolute(int)void afterLast()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.afterLast()void beforeFirst()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.beforeFirst()boolean first()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.first()int getRow()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.getRow()boolean isAfterLast()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.isAfterLast()boolean isBeforeFirst()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.isBeforeFirst()boolean isFirst()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.isFirst()boolean isLast()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.isLast()boolean last()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.last()boolean next()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.next()boolean previous()
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.previous()boolean relative(int rows)
throws InvalidResultSetAccessException
InvalidResultSetAccessExceptionResultSet.relative(int)boolean wasNull()
throws InvalidResultSetAccessException
NULL.
Note that you must first call one of the getter methods and then call
the wasNull method.NULL,
false otherwiseInvalidResultSetAccessExceptionResultSet.wasNull()