|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectnet.hasor.jdbc.core.rowset.ResultSetWrappingSqlRowSet
public class ResultSetWrappingSqlRowSet
Default implementation of Spring's SqlRowSet interface.
This implementation wraps a javax.sql.ResultSet,
catching any SQLExceptions and translating them to the
appropriate Spring InvalidDataAccessException.
The passed-in ResultSets 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: 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.
ResultSet,
CachedRowSet,
序列化表格| 构造方法摘要 | |
|---|---|
ResultSetWrappingSqlRowSet(ResultSet resultSet)
Create a new ResultSetWrappingSqlRowSet for the given ResultSet. |
|
| 方法摘要 | |
|---|---|
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(String columnName)
Maps the given column name to its column index. |
boolean |
first()
Moves the cursor to the first row of this RowSet. |
BigDecimal |
getBigDecimal(int columnIndex)
Retrieves the value of the indicated column in the current row as an BigDecimal object. |
BigDecimal |
getBigDecimal(String columnName)
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(String columnName)
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(String columnName)
Retrieves the value of the indicated column in the current row as a byte. |
Date |
getDate(int columnIndex)
Retrieves the value of the indicated column in the current row as a Date object. |
Date |
getDate(int columnIndex,
Calendar cal)
Retrieves the value of the indicated column in the current row as a Date object. |
Date |
getDate(String columnName)
Retrieves the value of the indicated column in the current row as a Date object. |
Date |
getDate(String columnName,
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(String columnName)
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(String columnName)
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(String columnName)
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(String columnName)
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. |
Object |
getObject(int columnIndex)
Retrieves the value of the indicated column in the current row as an Object. |
Object |
getObject(int i,
Map map)
Retrieves the value of the indicated column in the current row as an Object. |
Object |
getObject(String columnName)
Retrieves the value of the indicated column in the current row as an Object. |
Object |
getObject(String columnName,
Map map)
Retrieves 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()
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(String columnName)
Retrieves the value of the indicated column in the current row as a short. |
String |
getString(int columnIndex)
Retrieves the value of the indicated column in the current row as a String. |
String |
getString(String columnName)
Retrieves the value of the indicated column in the current row as a String. |
Time |
getTime(int columnIndex)
Retrieves the value of the indicated column in the current row as a Time object. |
Time |
getTime(int columnIndex,
Calendar cal)
Retrieves the value of the indicated column in the current row as a Time object. |
Time |
getTime(String columnName)
Retrieves the value of the indicated column in the current row as a Time object. |
Time |
getTime(String columnName,
Calendar cal)
Retrieves the value of the indicated column in the current row as a Time object. |
Timestamp |
getTimestamp(int columnIndex)
Retrieves the value of the indicated column in the current row as a Timestamp object. |
Timestamp |
getTimestamp(int columnIndex,
Calendar cal)
Retrieves the value of the indicated column in the current row as a Timestamp object. |
Timestamp |
getTimestamp(String columnName)
Retrieves the value of the indicated column in the current row as a Timestamp object. |
Timestamp |
getTimestamp(String columnName,
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. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ResultSetWrappingSqlRowSet(ResultSet resultSet)
throws InvalidDataAccessException
resultSet - a disconnected ResultSet to wrap
(usually a javax.sql.rowset.CachedRowSet)
InvalidDataAccessException - if extracting
the ResultSetMetaData failedCachedRowSet,
ResultSet.getMetaData(),
ResultSetWrappingSqlRowSetMetaData| 方法详细信息 |
|---|
public final ResultSet getResultSet()
javax.sql.rowset.CachedRowSet).
CachedRowSetpublic final SqlRowSetMetaData getMetaData()
SqlRowSet 复制的描述
SqlRowSet 中的 getMetaDataResultSetMetaData.getCatalogName(int)
public int findColumn(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 findColumncolumnName - the name of the column
InvalidDataAccessExceptionResultSet.findColumn(String)
public BigDecimal getBigDecimal(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getBigDecimalcolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getBigDecimal(int)
public BigDecimal getBigDecimal(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getBigDecimalcolumnName - the column name
InvalidDataAccessExceptionResultSet.getBigDecimal(String)
public boolean getBoolean(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getBooleancolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getBoolean(int)
public boolean getBoolean(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getBooleancolumnName - the column name
InvalidDataAccessExceptionResultSet.getBoolean(String)
public byte getByte(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getBytecolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getByte(int)
public byte getByte(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getBytecolumnName - the column name
InvalidDataAccessExceptionResultSet.getByte(String)
public Date getDate(int columnIndex,
Calendar cal)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getDatecolumnIndex - the column indexcal - the Calendar to use in constructing the Date
InvalidDataAccessExceptionResultSet.getDate(int, java.util.Calendar)
public Date getDate(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getDatecolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getDate(int)
public Date getDate(String columnName,
Calendar cal)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getDatecolumnName - the column namecal - the Calendar to use in constructing the Date
InvalidDataAccessExceptionResultSet.getDate(String, java.util.Calendar)
public Date getDate(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getDatecolumnName - the column name
InvalidDataAccessExceptionResultSet.getDate(String)
public double getDouble(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getDoublecolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getDouble(int)
public double getDouble(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getDoublecolumnName - the column name
InvalidDataAccessExceptionResultSet.getDouble(String)
public float getFloat(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getFloatcolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getFloat(int)
public float getFloat(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getFloatcolumnName - the column name
InvalidDataAccessExceptionResultSet.getFloat(String)
public int getInt(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getIntcolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getInt(int)
public int getInt(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getIntcolumnName - the column name
InvalidDataAccessExceptionResultSet.getInt(String)
public long getLong(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getLongcolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getLong(int)
public long getLong(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getLongcolumnName - the column name
InvalidDataAccessExceptionResultSet.getLong(String)
public Object getObject(int i,
Map map)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getObjecti - the column indexmap - a Map object containing the mapping from SQL types to Java types
InvalidDataAccessExceptionResultSet.getObject(int, java.util.Map)
public Object getObject(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getObjectcolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getObject(int)
public Object getObject(String columnName,
Map map)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getObjectcolumnName - the column namemap - a Map object containing the mapping from SQL types to Java types
InvalidDataAccessExceptionResultSet.getObject(String, java.util.Map)
public Object getObject(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getObjectcolumnName - the column name
InvalidDataAccessExceptionResultSet.getObject(String)
public short getShort(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getShortcolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getShort(int)
public short getShort(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getShortcolumnName - the column name
InvalidDataAccessExceptionResultSet.getShort(String)
public String getString(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getStringcolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getString(int)
public String getString(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getStringcolumnName - the column name
InvalidDataAccessExceptionResultSet.getString(String)
public Time getTime(int columnIndex,
Calendar cal)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getTimecolumnIndex - the column indexcal - the Calendar to use in constructing the Date
InvalidDataAccessExceptionResultSet.getTime(int, java.util.Calendar)
public Time getTime(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getTimecolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getTime(int)
public Time getTime(String columnName,
Calendar cal)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getTimecolumnName - the column namecal - the Calendar to use in constructing the Date
InvalidDataAccessExceptionResultSet.getTime(String, java.util.Calendar)
public Time getTime(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getTimecolumnName - the column name
InvalidDataAccessExceptionResultSet.getTime(String)
public Timestamp getTimestamp(int columnIndex,
Calendar cal)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getTimestampcolumnIndex - the column indexcal - the Calendar to use in constructing the Date
InvalidDataAccessExceptionResultSet.getTimestamp(int, java.util.Calendar)
public Timestamp getTimestamp(int columnIndex)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getTimestampcolumnIndex - the column index
InvalidDataAccessExceptionResultSet.getTimestamp(int)
public Timestamp getTimestamp(String columnName,
Calendar cal)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getTimestampcolumnName - the column namecal - the Calendar to use in constructing the Date
InvalidDataAccessExceptionResultSet.getTimestamp(String, java.util.Calendar)
public Timestamp getTimestamp(String columnName)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getTimestampcolumnName - the column name
InvalidDataAccessExceptionResultSet.getTimestamp(String)
public boolean absolute(int row)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 absoluterow - the number of the row where the cursor should move
InvalidDataAccessExceptionResultSet.absolute(int)
public void afterLast()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 afterLastInvalidDataAccessExceptionResultSet.afterLast()
public void beforeFirst()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 beforeFirstInvalidDataAccessExceptionResultSet.beforeFirst()
public boolean first()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 firstInvalidDataAccessExceptionResultSet.first()
public int getRow()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 getRowInvalidDataAccessExceptionResultSet.getRow()
public boolean isAfterLast()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 isAfterLastInvalidDataAccessExceptionResultSet.isAfterLast()
public boolean isBeforeFirst()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 isBeforeFirstInvalidDataAccessExceptionResultSet.isBeforeFirst()
public boolean isFirst()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 isFirstInvalidDataAccessExceptionResultSet.isFirst()
public boolean isLast()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 isLastInvalidDataAccessExceptionResultSet.isLast()
public boolean last()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 lastInvalidDataAccessExceptionResultSet.last()
public boolean next()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 nextInvalidDataAccessExceptionResultSet.next()
public boolean previous()
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 previousInvalidDataAccessExceptionResultSet.previous()
public boolean relative(int rows)
throws InvalidDataAccessException
SqlRowSet 复制的描述
SqlRowSet 中的 relativeInvalidDataAccessExceptionResultSet.relative(int)
public boolean wasNull()
throws InvalidDataAccessException
SqlRowSet 复制的描述NULL.
Note that you must first call one of the getter methods and then call
the wasNull method.
SqlRowSet 中的 wasNullNULL,
false otherwise
InvalidDataAccessExceptionResultSet.wasNull()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||