net.hasor.jdbc.core
类 SqlRowSetResultSetExtractor

java.lang.Object
  继承者 net.hasor.jdbc.core.SqlRowSetResultSetExtractor
所有已实现的接口:
ResultSetExtractor<SqlRowSet>

public class SqlRowSetResultSetExtractor
extends Object
implements ResultSetExtractor<SqlRowSet>

接口 ResultSetExtractor 实现类,返回一个 SqlRowSet 数据集对象。

默认实现使用 JDBC 标准 CachedRowSet.需要保证在运行时 com.sun.rowset.CachedRowSetImpl 类是可用的。

从以下版本开始:
1.2
作者:
Juergen Hoeller
另请参见:
newCachedRowSet(), CachedRowSet

构造方法摘要
SqlRowSetResultSetExtractor()
           
 
方法摘要
protected  SqlRowSet createSqlRowSet(ResultSet rs)
          Create a SqlRowSet that wraps the given ResultSet, representing its data in a disconnected fashion.
 SqlRowSet extractData(ResultSet rs)
          将结果集内容转换。
protected  CachedRowSet newCachedRowSet()
          Create a new CachedRowSet instance, to be populated by the createSqlRowSet implementation.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SqlRowSetResultSetExtractor

public SqlRowSetResultSetExtractor()
方法详细信息

extractData

public SqlRowSet extractData(ResultSet rs)
                      throws SQLException
从接口 ResultSetExtractor 复制的描述
将结果集内容转换。

指定者:
接口 ResultSetExtractor<SqlRowSet> 中的 extractData
抛出:
SQLException

createSqlRowSet

protected SqlRowSet createSqlRowSet(ResultSet rs)
                             throws SQLException
Create a SqlRowSet that wraps the given ResultSet, representing its data in a disconnected fashion.

This implementation creates a Spring ResultSetWrappingSqlRowSet instance that wraps a standard JDBC CachedRowSet instance. Can be overridden to use a different implementation.

参数:
rs - the original ResultSet (connected)
返回:
the disconnected SqlRowSet
抛出:
SQLException - if thrown by JDBC methods
另请参见:
newCachedRowSet(), org.noe.platform.modules.db.jdbcorm.jdbc.support.rowset.ResultSetWrappingSqlRowSet

newCachedRowSet

protected CachedRowSet newCachedRowSet()
                                throws SQLException
Create a new CachedRowSet instance, to be populated by the createSqlRowSet implementation.

The default implementation creates a new instance of Sun's com.sun.rowset.CachedRowSetImpl class.

返回:
a new CachedRowSet instance
抛出:
SQLException - if thrown by JDBC methods
另请参见:
createSqlRowSet(java.sql.ResultSet), CachedRowSetImpl


Copyright © 2013-2014. All Rights Reserved.