net.paoding.rose.jade.rowmapper
类 DefaultRowMapperFactory
java.lang.Object
net.paoding.rose.jade.rowmapper.DefaultRowMapperFactory
- 所有已实现的接口:
- RowMapperFactory
public class DefaultRowMapperFactory
- extends Object
- implements RowMapperFactory
支持DAO方法返回类型:
- int、long等primitive:期望返回单列、1行
- Integer、Long等包装类型的:期望返回单列、0行或1行
- String、BigDecimal:期望返回单列,0行或1行
- java.util.Date及其子类:期望返回单列,0行或1行
- byte[]:期望返回单行、单列;列类型可转化为byte[]类型(比如blob类型)
- Blob、Clob:期望返回单,0行或1行
数组(int[]、String[]等):期望返回单列,多行;
- 数组(User[]等):期望返回多列,多行;
- 集合(List<Integer>、Set<String>等): 期望返回单列,多行;
- 集合(List<User>、Set<User>等): 期望返回单列,多行;
- 映射(Map<String, Date>): 期望返回2列,多行
- 映射(Map<String, User>): 期望返回多列,多行
- 映射(Map<String, String[]>): 期望返回多列,多行
- 作者:
- 王志亮 [qieqie.wang@gmail.com], 廖涵 [in355hz@gmail.com]
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultRowMapperFactory
public DefaultRowMapperFactory()
getRowMapper
public org.springframework.jdbc.core.RowMapper getRowMapper(StatementMetaData modifier)
- 从接口
RowMapperFactory 复制的描述
- 根据DAO方法的返回类型定义,解析可能存在的泛型,创建对应的行映射器对象。
- 指定者:
- 接口
RowMapperFactory 中的 getRowMapper
- 返回:
- 如果无法解析时可返回null
Copyright © 2012. All Rights Reserved.