类 ResultSetWrappingSqlRowSet
- java.lang.Object
- org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet
- 所有已实现的接口:
Serializable
,SqlRowSet
public class ResultSetWrappingSqlRowSet extends Object implements SqlRowSet
The default implementation of Spring'sSqlRowSet
interface, wrapping aResultSet
, catching anySQLException
s and translating them to a corresponding SpringInvalidResultSetAccessException
.The passed-in ResultSet should already be disconnected if the SqlRowSet is supposed to be usable in a disconnected fashion. This means that you will usually pass in a
javax.sql.rowset.CachedRowSet
, which implements the ResultSet interface.Note: Since JDBC 4.0, it has been clarified that any methods using a String to identify the column should be using the column label. The column label is assigned using the ALIAS keyword in the SQL query string. When the query doesn't use an ALIAS, the default label is the column name. Most JDBC ResultSet implementations follow this new pattern but there are exceptions such as the
com.sun.rowset.CachedRowSetImpl
class which only uses the column name, ignoring any column labels. As of Spring 3.0.5, ResultSetWrappingSqlRowSet will translate column labels to the correct column index to provide better support for thecom.sun.rowset.CachedRowSetImpl
which is the default implementation used byJdbcTemplate
when working with RowSets.Note: This class implements the
java.io.Serializable
marker interface through the SqlRowSet interface, but is only actually serializable if the disconnected ResultSet/RowSet contained in it is serializable. Most CachedRowSet implementations are actually serializable, so this should usually work out.- 从以下版本开始:
- 1.2
- 作者:
- Thomas Risberg, Juergen Hoeller
- 另请参阅:
ResultSet
,CachedRowSet
,JdbcTemplate.queryForRowSet(java.lang.String)
, 序列化表格
构造器概要
构造器 构造器 说明 ResultSetWrappingSqlRowSet(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 ajavax.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 SQLNULL
.
构造器详细资料
ResultSetWrappingSqlRowSet
public ResultSetWrappingSqlRowSet(ResultSet resultSet) throws InvalidResultSetAccessException
Create a new ResultSetWrappingSqlRowSet for the given ResultSet.- 参数:
resultSet
- a disconnected ResultSet to wrap (usually ajavax.sql.rowset.CachedRowSet
)- 抛出:
InvalidResultSetAccessException
- if extracting the ResultSetMetaData failed- 另请参阅:
CachedRowSet
,ResultSet.getMetaData()
,ResultSetWrappingSqlRowSetMetaData
方法详细资料
getResultSet
public final ResultSet getResultSet()
Return the underlying ResultSet (usually ajavax.sql.rowset.CachedRowSet
).- 另请参阅:
CachedRowSet
getMetaData
public final SqlRowSetMetaData getMetaData()
从接口复制的说明:SqlRowSet
Retrieve the meta-data, i.e. number, types and properties for the columns of this row set.- 指定者:
getMetaData
在接口中SqlRowSet
- 返回:
- a corresponding SqlRowSetMetaData instance
- 另请参阅:
ResultSetMetaData.getCatalogName(int)
findColumn
public int findColumn(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Map the given column label to its column index.- 指定者:
findColumn
在接口中SqlRowSet
- 参数:
columnLabel
- the name of the column- 返回:
- the column index for the given column label
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.findColumn(String)
getBigDecimal
public BigDecimal getBigDecimal(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a BigDecimal object.- 指定者:
getBigDecimal
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- an BigDecimal object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getBigDecimal(int)
getBigDecimal
public BigDecimal getBigDecimal(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a BigDecimal object.- 指定者:
getBigDecimal
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- an BigDecimal object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getBigDecimal(String)
getBoolean
public boolean getBoolean(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a boolean.- 指定者:
getBoolean
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a boolean representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getBoolean(int)
getBoolean
public boolean getBoolean(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a boolean.- 指定者:
getBoolean
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a boolean representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getBoolean(String)
getByte
public byte getByte(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a byte.- 指定者:
getByte
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a byte representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getByte(int)
getByte
public byte getByte(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a byte.- 指定者:
getByte
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a byte representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getByte(String)
getDate
public Date getDate(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Date object.- 指定者:
getDate
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a Date object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getDate(int)
getDate
public Date getDate(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Date object.- 指定者:
getDate
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a Date object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getDate(String)
getDate
public Date getDate(int columnIndex, Calendar cal) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Date object.- 指定者:
getDate
在接口中SqlRowSet
- 参数:
columnIndex
- the column indexcal
- the Calendar to use in constructing the Date- 返回:
- a Date object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getDate(int, Calendar)
getDate
public Date getDate(String columnLabel, Calendar cal) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Date object.- 指定者:
getDate
在接口中SqlRowSet
- 参数:
columnLabel
- the column labelcal
- the Calendar to use in constructing the Date- 返回:
- a Date object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getDate(String, Calendar)
getDouble
public double getDouble(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Double object.- 指定者:
getDouble
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a Double object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getDouble(int)
getDouble
public double getDouble(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Double object.- 指定者:
getDouble
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a Double object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getDouble(String)
getFloat
public float getFloat(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a float.- 指定者:
getFloat
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a float representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getFloat(int)
getFloat
public float getFloat(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a float.- 指定者:
getFloat
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a float representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getFloat(String)
getInt
public int getInt(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as an int.- 指定者:
getInt
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- an int representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getInt(int)
getInt
public int getInt(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as an int.- 指定者:
getInt
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- an int representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getInt(String)
getLong
public long getLong(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a long.- 指定者:
getLong
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a long representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getLong(int)
getLong
public long getLong(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a long.- 指定者:
getLong
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a long representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getLong(String)
getNString
public String getNString(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a String (for NCHAR, NVARCHAR, LONGNVARCHAR columns).- 指定者:
getNString
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a String representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getNString(int)
getNString
public String getNString(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a String (for NCHAR, NVARCHAR, LONGNVARCHAR columns).- 指定者:
getNString
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a String representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getNString(String)
getObject
public Object getObject(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as an Object.- 指定者:
getObject
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a Object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getObject(int)
getObject
public Object getObject(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as an Object.- 指定者:
getObject
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a Object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getObject(String)
getObject
public Object getObject(int columnIndex, Map<String,Class<?>> map) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as an Object.- 指定者:
getObject
在接口中SqlRowSet
- 参数:
columnIndex
- the column indexmap
- a Map object containing the mapping from SQL types to Java types- 返回:
- a Object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getObject(int, Map)
getObject
public Object getObject(String columnLabel, Map<String,Class<?>> map) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as an Object.- 指定者:
getObject
在接口中SqlRowSet
- 参数:
columnLabel
- the column labelmap
- a Map object containing the mapping from SQL types to Java types- 返回:
- a Object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getObject(String, Map)
getObject
@UsesJava7 public <T> T getObject(int columnIndex, Class<T> type) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as an Object.- 指定者:
getObject
在接口中SqlRowSet
- 参数:
columnIndex
- the column indextype
- the Java type to convert the designated column to- 返回:
- a Object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getObject(int, Class)
getObject
public <T> T getObject(String columnLabel, Class<T> type) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as an Object.- 指定者:
getObject
在接口中SqlRowSet
- 参数:
columnLabel
- the column labeltype
- the Java type to convert the designated column to- 返回:
- a Object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getObject(String, Class)
getShort
public short getShort(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a short.- 指定者:
getShort
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a short representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getShort(int)
getShort
public short getShort(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a short.- 指定者:
getShort
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a short representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getShort(String)
getString
public String getString(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a String.- 指定者:
getString
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a String representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getString(int)
getString
public String getString(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a String.- 指定者:
getString
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a String representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getString(String)
getTime
public Time getTime(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Time object.- 指定者:
getTime
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a Time object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getTime(int)
getTime
public Time getTime(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Time object.- 指定者:
getTime
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a Time object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getTime(String)
getTime
public Time getTime(int columnIndex, Calendar cal) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Time object.- 指定者:
getTime
在接口中SqlRowSet
- 参数:
columnIndex
- the column indexcal
- the Calendar to use in constructing the Date- 返回:
- a Time object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getTime(int, Calendar)
getTime
public Time getTime(String columnLabel, Calendar cal) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Time object.- 指定者:
getTime
在接口中SqlRowSet
- 参数:
columnLabel
- the column labelcal
- the Calendar to use in constructing the Date- 返回:
- a Time object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getTime(String, Calendar)
getTimestamp
public Timestamp getTimestamp(int columnIndex) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Timestamp object.- 指定者:
getTimestamp
在接口中SqlRowSet
- 参数:
columnIndex
- the column index- 返回:
- a Timestamp object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getTimestamp(int)
getTimestamp
public Timestamp getTimestamp(String columnLabel) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Timestamp object.- 指定者:
getTimestamp
在接口中SqlRowSet
- 参数:
columnLabel
- the column label- 返回:
- a Timestamp object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getTimestamp(String)
getTimestamp
public Timestamp getTimestamp(int columnIndex, Calendar cal) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Timestamp object.- 指定者:
getTimestamp
在接口中SqlRowSet
- 参数:
columnIndex
- the column indexcal
- the Calendar to use in constructing the Date- 返回:
- a Timestamp object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getTimestamp(int, Calendar)
getTimestamp
public Timestamp getTimestamp(String columnLabel, Calendar cal) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the value of the indicated column in the current row as a Timestamp object.- 指定者:
getTimestamp
在接口中SqlRowSet
- 参数:
columnLabel
- the column labelcal
- the Calendar to use in constructing the Date- 返回:
- a Timestamp object representing the column value
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getTimestamp(String, Calendar)
absolute
public boolean absolute(int row) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Move the cursor to the given row number in the row set, just after the last row.- 指定者:
absolute
在接口中SqlRowSet
- 参数:
row
- the number of the row where the cursor should move- 返回:
true
if the cursor is on the row set,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.absolute(int)
afterLast
public void afterLast() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Move the cursor to the end of this row set.- 指定者:
afterLast
在接口中SqlRowSet
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.afterLast()
beforeFirst
public void beforeFirst() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Move the cursor to the front of this row set, just before the first row.
first
public boolean first() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Move the cursor to the first row of this row set.- 指定者:
first
在接口中SqlRowSet
- 返回:
true
if the cursor is on a valid row,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.first()
getRow
public int getRow() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve the current row number.- 指定者:
getRow
在接口中SqlRowSet
- 返回:
- the current row number
- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.getRow()
isAfterLast
public boolean isAfterLast() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve whether the cursor is after the last row of this row set.- 指定者:
isAfterLast
在接口中SqlRowSet
- 返回:
true
if the cursor is after the last row,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.isAfterLast()
isBeforeFirst
public boolean isBeforeFirst() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve whether the cursor is before the first row of this row set.- 指定者:
isBeforeFirst
在接口中SqlRowSet
- 返回:
true
if the cursor is before the first row,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.isBeforeFirst()
isFirst
public boolean isFirst() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve whether the cursor is on the first row of this row set.- 指定者:
isFirst
在接口中SqlRowSet
- 返回:
true
if the cursor is after the first row,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.isFirst()
isLast
public boolean isLast() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Retrieve whether the cursor is on the last row of this row set.- 指定者:
isLast
在接口中SqlRowSet
- 返回:
true
if the cursor is after the last row,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.isLast()
last
public boolean last() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Move the cursor to the last row of this row set.- 指定者:
last
在接口中SqlRowSet
- 返回:
true
if the cursor is on a valid row,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.last()
next
public boolean next() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Move the cursor to the next row.- 指定者:
next
在接口中SqlRowSet
- 返回:
true
if the new row is valid,false
if there are no more rows- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.next()
previous
public boolean previous() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Move the cursor to the previous row.- 指定者:
previous
在接口中SqlRowSet
- 返回:
true
if the new row is valid,false
if it is off the row set- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.previous()
relative
public boolean relative(int rows) throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Move the cursor a relative number of rows, either positive or negative.- 指定者:
relative
在接口中SqlRowSet
- 返回:
true
if the cursor is on a row,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.relative(int)
wasNull
public boolean wasNull() throws InvalidResultSetAccessException
从接口复制的说明:SqlRowSet
Report whether the last column read had a value of SQLNULL
.Note that you must first call one of the getter methods and then call the
wasNull()
method.- 指定者:
wasNull
在接口中SqlRowSet
- 返回:
true
if the most recent column retrieved was SQLNULL
,false
otherwise- 抛出:
InvalidResultSetAccessException
- 另请参阅:
ResultSet.wasNull()