Class SingleColumnRowMapper<T>

java.lang.Object
org.huiche.jdbc.mapper.row.SingleColumnRowMapper<T>
Type Parameters:
T - 列类型
All Implemented Interfaces:
RowMapper<T>

public final class SingleColumnRowMapper<T> extends Object implements RowMapper<T>
单列行转换器
Author:
Maning
  • Method Details

    • of

      public static <T> SingleColumnRowMapper<T> of(Type type)
      创建单列行转换器
      Type Parameters:
      T - 列类型泛型
      Parameters:
      type - 列类型
      Returns:
      转换器
    • map

      public T map(ResultSet rs, IndexMapper indexMapper, Configuration configuration) throws SQLException
      Description copied from interface: RowMapper
      将结果集转换实体
      Specified by:
      map in interface RowMapper<T>
      Parameters:
      rs - 结果集
      indexMapper - 列下标的映射
      configuration - 配置
      Returns:
      实体
      Throws:
      SQLException - 原生SQL异常
    • type

      public Type type()
      Description copied from interface: RowMapper
      类型
      Specified by:
      type in interface RowMapper<T>
      Returns:
      类型