Class EntityRowMapper<T>

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

public final class EntityRowMapper<T> extends Object implements RowMapper<T>
实体类行转换器
Author:
Maning
  • Method Details

    • of

      public static <T> EntityRowMapper<T> of(Class<T> clazz)
      创建实体类转换器
      Type Parameters:
      T - 实体类类型
      Parameters:
      clazz - 实体类
      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:
      类型