net.hasor.db.jdbc.core.mapper
类 SingleColumnRowMapper<T>

java.lang.Object
  继承者 net.hasor.db.jdbc.core.mapper.AbstractRowMapper<T>
      继承者 net.hasor.db.jdbc.core.mapper.SingleColumnRowMapper<T>
所有已实现的接口:
RowMapper<T>

public class SingleColumnRowMapper<T>
extends AbstractRowMapper<T>

版本:
: 2014年5月23日
作者:
赵永春 (zyc@byshell.org)

构造方法摘要
SingleColumnRowMapper()
          Create a new SingleColumnRowMapper.
SingleColumnRowMapper(Class<T> requiredType)
          Create a new SingleColumnRowMapper.
 
方法摘要
 T mapRow(ResultSet rs, int rowNum)
          将当前行的第一列的值转换为指定的类型。
 void setRequiredType(Class<T> requiredType)
          Set the type that each result object is expected to match.
 
从类 net.hasor.db.jdbc.core.mapper.AbstractRowMapper 继承的方法
convertValueToRequiredType, getResultSetValue
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SingleColumnRowMapper

public SingleColumnRowMapper()
Create a new SingleColumnRowMapper.


SingleColumnRowMapper

public SingleColumnRowMapper(Class<T> requiredType)
Create a new SingleColumnRowMapper.

参数:
requiredType - the type that each result object is expected to match
方法详细信息

setRequiredType

public void setRequiredType(Class<T> requiredType)
Set the type that each result object is expected to match.

If not specified, the column value will be exposed as returned by the JDBC driver.


mapRow

public T mapRow(ResultSet rs,
                int rowNum)
         throws SQLException
将当前行的第一列的值转换为指定的类型。

参数:
rs - 记录集
rowNum - 当前记录的行号
抛出:
SQLException


Copyright © 2014. All rights reserved.