标签:ibatis java
public Object queryPageData(String sql, Object param) {
List<Object> part = null;
List<Object> resultList = new ArrayList<Object>();
int maxCount = SqlMapClientFactoryBean.maxRowCount - 1;
do {
part = (List<Object>) this.getSqlMapClientTemplate().queryForList(sql, param, resultList.size(), maxCount);
if (part != null && part.size() > 0) {
resultList.addAll(part);
}
} while (part != null && part.size() >= maxCount);
return resultList;
}
1)这是一个通用的查询方法,解决ibatis查询返回最大数据量的问题。
public List queryForList(String statementName, Object parameterObject,
int skipResults, int maxResults);
标签:ibatis java
原文地址:http://6817977.blog.51cto.com/6807977/1630551