public class SqlRowSetWrapp extends Object implements SqlRowSet
| 构造器和说明 |
|---|
SqlRowSetWrapp(ResultSet resultSet)
Create a new ResultSetWrappingSqlRowSet for the given ResultSet.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
absolute(int row)
Move the cursor to the given row number in the row set,
just after the last row.
|
void |
afterLast()
Move the cursor to the end of this row set.
|
void |
beforeFirst()
Move the cursor to the front of this row set,
just before the first row.
|
int |
findColumn(String columnLabel)
Map the given column label to its column index.
|
boolean |
first()
Move the cursor to the first row of this row set.
|
BigDecimal |
getBigDecimal(int columnIndex)
Retrieve the value of the indicated column in the current row
as a BigDecimal object.
|
BigDecimal |
getBigDecimal(String columnLabel)
Retrieve the value of the indicated column in the current row
as a BigDecimal object.
|
boolean |
getBoolean(int columnIndex)
Retrieve the value of the indicated column in the current row
as a boolean.
|
boolean |
getBoolean(String columnLabel)
Retrieve the value of the indicated column in the current row
as a boolean.
|
byte |
getByte(int columnIndex)
Retrieve the value of the indicated column in the current row
as a byte.
|
byte |
getByte(String columnLabel)
Retrieve the value of the indicated column in the current row
as a byte.
|
Date |
getDate(int columnIndex)
Retrieve the value of the indicated column in the current row
as a Date object.
|
Date |
getDate(int columnIndex,
Calendar cal)
Retrieve the value of the indicated column in the current row
as a Date object.
|
Date |
getDate(String columnLabel)
Retrieve the value of the indicated column in the current row
as a Date object.
|
Date |
getDate(String columnLabel,
Calendar cal)
Retrieve the value of the indicated column in the current row
as a Date object.
|
double |
getDouble(int columnIndex)
Retrieve the value of the indicated column in the current row
as a Double object.
|
double |
getDouble(String columnLabel)
Retrieve the value of the indicated column in the current row
as a Double object.
|
float |
getFloat(int columnIndex)
Retrieve the value of the indicated column in the current row
as a float.
|
float |
getFloat(String columnLabel)
Retrieve the value of the indicated column in the current row
as a float.
|
int |
getInt(int columnIndex)
Retrieve the value of the indicated column in the current row
as an int.
|
int |
getInt(String columnLabel)
Retrieve the value of the indicated column in the current row
as an int.
|
long |
getLong(int columnIndex)
Retrieve the value of the indicated column in the current row
as a long.
|
long |
getLong(String columnLabel)
Retrieve the value of the indicated column in the current row
as a long.
|
SqlRowSetMetaData |
getMetaData()
Retrieve the meta data, i.e. number, types and properties
for the columns of this row set.
|
String |
getNString(int columnIndex)
Retrieve the value of the indicated column in the current row
as a String (for NCHAR, NVARCHAR, LONGNVARCHAR columns).
|
String |
getNString(String columnLabel)
Retrieve the value of the indicated column in the current row
as a String (for NCHAR, NVARCHAR, LONGNVARCHAR columns).
|
Object |
getObject(int columnIndex)
Retrieve the value of the indicated column in the current row
as an Object.
|
<T> T |
getObject(int columnIndex,
Class<T> type)
Retrieve the value of the indicated column in the current row
as an Object.
|
Object |
getObject(int columnIndex,
Map<String,Class<?>> map)
Retrieve the value of the indicated column in the current row
as an Object.
|
Object |
getObject(String columnLabel)
Retrieve the value of the indicated column in the current row
as an Object.
|
<T> T |
getObject(String columnLabel,
Class<T> type)
Retrieve the value of the indicated column in the current row
as an Object.
|
Object |
getObject(String columnLabel,
Map<String,Class<?>> map)
Retrieve the value of the indicated column in the current row
as an Object.
|
ResultSet |
getResultSet()
Return the underlying ResultSet
(usually a
javax.sql.rowset.CachedRowSet). |
int |
getRow()
Retrieve the current row number.
|
short |
getShort(int columnIndex)
Retrieve the value of the indicated column in the current row
as a short.
|
short |
getShort(String columnLabel)
Retrieve the value of the indicated column in the current row
as a short.
|
String |
getString(int columnIndex)
Retrieve the value of the indicated column in the current row
as a String.
|
String |
getString(String columnLabel)
Retrieve the value of the indicated column in the current row
as a String.
|
Time |
getTime(int columnIndex)
Retrieve the value of the indicated column in the current row
as a Time object.
|
Time |
getTime(int columnIndex,
Calendar cal)
Retrieve the value of the indicated column in the current row
as a Time object.
|
Time |
getTime(String columnLabel)
Retrieve the value of the indicated column in the current row
as a Time object.
|
Time |
getTime(String columnLabel,
Calendar cal)
Retrieve the value of the indicated column in the current row
as a Time object.
|
Timestamp |
getTimestamp(int columnIndex)
Retrieve the value of the indicated column in the current row
as a Timestamp object.
|
Timestamp |
getTimestamp(int columnIndex,
Calendar cal)
Retrieve the value of the indicated column in the current row
as a Timestamp object.
|
Timestamp |
getTimestamp(String columnLabel)
Retrieve the value of the indicated column in the current row
as a Timestamp object.
|
Timestamp |
getTimestamp(String columnLabel,
Calendar cal)
Retrieve the value of the indicated column in the current row
as a Timestamp object.
|
boolean |
isAfterLast()
Retrieve whether the cursor is after the last row of this row set.
|
boolean |
isBeforeFirst()
Retrieve whether the cursor is before the first row of this row set.
|
boolean |
isFirst()
Retrieve whether the cursor is on the first row of this row set.
|
boolean |
isLast()
Retrieve whether the cursor is on the last row of this row set.
|
boolean |
last()
Move the cursor to the last row of this row set.
|
boolean |
next()
Move the cursor to the next row.
|
boolean |
previous()
Move the cursor to the previous row.
|
boolean |
relative(int rows)
Move the cursor a relative number of rows,
either positive or negative.
|
boolean |
wasNull()
Report whether the last column read had a value of SQL
NULL. |
public SqlRowSetWrapp(ResultSet resultSet) throws InvalidResultSetAccessException
resultSet - a disconnected ResultSet to wrap
(usually a javax.sql.rowset.CachedRowSet)InvalidResultSetAccessException - if extracting
the ResultSetMetaData failedCachedRowSet,
ResultSet.getMetaData(),
ResultSetWrappingSqlRowSetMetaDatapublic final ResultSet getResultSet()
javax.sql.rowset.CachedRowSet).CachedRowSetpublic final SqlRowSetMetaData getMetaData()
SqlRowSetgetMetaData 在接口中 SqlRowSetResultSetMetaData.getCatalogName(int)public int findColumn(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetfindColumn 在接口中 SqlRowSetcolumnLabel - the name of the columnInvalidResultSetAccessExceptionResultSet.findColumn(String)public BigDecimal getBigDecimal(int columnIndex) throws InvalidResultSetAccessException
SqlRowSetgetBigDecimal 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getBigDecimal(int)public BigDecimal getBigDecimal(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetBigDecimal 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getBigDecimal(String)public boolean getBoolean(int columnIndex)
throws InvalidResultSetAccessException
SqlRowSetgetBoolean 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getBoolean(int)public boolean getBoolean(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetBoolean 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getBoolean(String)public byte getByte(int columnIndex)
throws InvalidResultSetAccessException
SqlRowSetgetByte 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getByte(int)public byte getByte(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetByte 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getByte(String)public Date getDate(int columnIndex) throws InvalidResultSetAccessException
SqlRowSetgetDate 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getDate(int)public Date getDate(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetDate 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getDate(String)public Date getDate(int columnIndex, Calendar cal) throws InvalidResultSetAccessException
SqlRowSetgetDate 在接口中 SqlRowSetcolumnIndex - the column indexcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getDate(int, Calendar)public Date getDate(String columnLabel, Calendar cal) throws InvalidResultSetAccessException
SqlRowSetgetDate 在接口中 SqlRowSetcolumnLabel - the column labelcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getDate(String, Calendar)public double getDouble(int columnIndex)
throws InvalidResultSetAccessException
SqlRowSetgetDouble 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getDouble(int)public double getDouble(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetDouble 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getDouble(String)public float getFloat(int columnIndex)
throws InvalidResultSetAccessException
SqlRowSetgetFloat 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getFloat(int)public float getFloat(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetFloat 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getFloat(String)public int getInt(int columnIndex)
throws InvalidResultSetAccessException
SqlRowSetgetInt 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getInt(int)public int getInt(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetInt 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getInt(String)public long getLong(int columnIndex)
throws InvalidResultSetAccessException
SqlRowSetgetLong 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getLong(int)public long getLong(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetLong 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getLong(String)public String getNString(int columnIndex) throws InvalidResultSetAccessException
SqlRowSetgetNString 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getNString(int)public String getNString(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetNString 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getNString(String)public Object getObject(int columnIndex) throws InvalidResultSetAccessException
SqlRowSetgetObject 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getObject(int)public Object getObject(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetObject 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getObject(String)public Object getObject(int columnIndex, Map<String,Class<?>> map) throws InvalidResultSetAccessException
SqlRowSetgetObject 在接口中 SqlRowSetcolumnIndex - the column indexmap - a Map object containing the mapping from SQL types to Java typesInvalidResultSetAccessExceptionResultSet.getObject(int, Map)public Object getObject(String columnLabel, Map<String,Class<?>> map) throws InvalidResultSetAccessException
SqlRowSetgetObject 在接口中 SqlRowSetcolumnLabel - the column labelmap - a Map object containing the mapping from SQL types to Java typesInvalidResultSetAccessExceptionResultSet.getObject(String, Map)public <T> T getObject(int columnIndex,
Class<T> type)
throws InvalidResultSetAccessException
SqlRowSetgetObject 在接口中 SqlRowSetcolumnIndex - the column indextype - the Java type to convert the designated column toInvalidResultSetAccessExceptionResultSet.getObject(int, Class)public <T> T getObject(String columnLabel, Class<T> type) throws InvalidResultSetAccessException
SqlRowSetgetObject 在接口中 SqlRowSetcolumnLabel - the column labeltype - the Java type to convert the designated column toInvalidResultSetAccessExceptionResultSet.getObject(String, Class)public short getShort(int columnIndex)
throws InvalidResultSetAccessException
SqlRowSetgetShort 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getShort(int)public short getShort(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetShort 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getShort(String)public String getString(int columnIndex) throws InvalidResultSetAccessException
SqlRowSetgetString 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getString(int)public String getString(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetString 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getString(String)public Time getTime(int columnIndex) throws InvalidResultSetAccessException
SqlRowSetgetTime 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getTime(int)public Time getTime(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetTime 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getTime(String)public Time getTime(int columnIndex, Calendar cal) throws InvalidResultSetAccessException
SqlRowSetgetTime 在接口中 SqlRowSetcolumnIndex - the column indexcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getTime(int, Calendar)public Time getTime(String columnLabel, Calendar cal) throws InvalidResultSetAccessException
SqlRowSetgetTime 在接口中 SqlRowSetcolumnLabel - the column labelcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getTime(String, Calendar)public Timestamp getTimestamp(int columnIndex) throws InvalidResultSetAccessException
SqlRowSetgetTimestamp 在接口中 SqlRowSetcolumnIndex - the column indexInvalidResultSetAccessExceptionResultSet.getTimestamp(int)public Timestamp getTimestamp(String columnLabel) throws InvalidResultSetAccessException
SqlRowSetgetTimestamp 在接口中 SqlRowSetcolumnLabel - the column labelInvalidResultSetAccessExceptionResultSet.getTimestamp(String)public Timestamp getTimestamp(int columnIndex, Calendar cal) throws InvalidResultSetAccessException
SqlRowSetgetTimestamp 在接口中 SqlRowSetcolumnIndex - the column indexcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getTimestamp(int, Calendar)public Timestamp getTimestamp(String columnLabel, Calendar cal) throws InvalidResultSetAccessException
SqlRowSetgetTimestamp 在接口中 SqlRowSetcolumnLabel - the column labelcal - the Calendar to use in constructing the DateInvalidResultSetAccessExceptionResultSet.getTimestamp(String, Calendar)public boolean absolute(int row)
throws InvalidResultSetAccessException
SqlRowSetabsolute 在接口中 SqlRowSetrow - the number of the row where the cursor should movetrue if the cursor is on the row set,
false otherwiseInvalidResultSetAccessExceptionResultSet.absolute(int)public void afterLast()
throws InvalidResultSetAccessException
SqlRowSetafterLast 在接口中 SqlRowSetInvalidResultSetAccessExceptionResultSet.afterLast()public void beforeFirst()
throws InvalidResultSetAccessException
SqlRowSetbeforeFirst 在接口中 SqlRowSetInvalidResultSetAccessExceptionResultSet.beforeFirst()public boolean first()
throws InvalidResultSetAccessException
SqlRowSetfirst 在接口中 SqlRowSettrue if the cursor is on a valid row,
false otherwiseInvalidResultSetAccessExceptionResultSet.first()public int getRow()
throws InvalidResultSetAccessException
SqlRowSetgetRow 在接口中 SqlRowSetInvalidResultSetAccessExceptionResultSet.getRow()public boolean isAfterLast()
throws InvalidResultSetAccessException
SqlRowSetisAfterLast 在接口中 SqlRowSettrue if the cursor is after the last row,
false otherwiseInvalidResultSetAccessExceptionResultSet.isAfterLast()public boolean isBeforeFirst()
throws InvalidResultSetAccessException
SqlRowSetisBeforeFirst 在接口中 SqlRowSettrue if the cursor is before the first row,
false otherwiseInvalidResultSetAccessExceptionResultSet.isBeforeFirst()public boolean isFirst()
throws InvalidResultSetAccessException
SqlRowSetisFirst 在接口中 SqlRowSettrue if the cursor is after the first row,
false otherwiseInvalidResultSetAccessExceptionResultSet.isFirst()public boolean isLast()
throws InvalidResultSetAccessException
SqlRowSetisLast 在接口中 SqlRowSettrue if the cursor is after the last row,
false otherwiseInvalidResultSetAccessExceptionResultSet.isLast()public boolean last()
throws InvalidResultSetAccessException
SqlRowSetlast 在接口中 SqlRowSettrue if the cursor is on a valid row,
false otherwiseInvalidResultSetAccessExceptionResultSet.last()public boolean next()
throws InvalidResultSetAccessException
SqlRowSetnext 在接口中 SqlRowSettrue if the new row is valid,
false if there are no more rowsInvalidResultSetAccessExceptionResultSet.next()public boolean previous()
throws InvalidResultSetAccessException
SqlRowSetprevious 在接口中 SqlRowSettrue if the new row is valid,
false if it is off the row setInvalidResultSetAccessExceptionResultSet.previous()public boolean relative(int rows)
throws InvalidResultSetAccessException
SqlRowSetrelative 在接口中 SqlRowSettrue if the cursor is on a row,
false otherwiseInvalidResultSetAccessExceptionResultSet.relative(int)public boolean wasNull()
throws InvalidResultSetAccessException
SqlRowSetNULL.
Note that you must first call one of the getter methods
and then call the wasNull() method.
wasNull 在接口中 SqlRowSettrue if the most recent coumn retrieved was
SQL NULL, false otherwiseInvalidResultSetAccessExceptionResultSet.wasNull()Copyright © 2023. All rights reserved.