设为首页 加入收藏

TOP

ibatis之批量操作实例
2014-11-24 01:33:19 来源: 作者: 【 】 浏览:6
Tags:ibatis 批量 操作 实例
public void batchUpdateExec(String sqlId, List param) throws DaoException {
if (sqlId != null && sqlId.length() > 0) {
if (param != null && param.size() > 0) {
try {
this.getSqlMapClient().startBatch();
for (int i = 0; i < param.size(); i++) {
this.getSqlMapClient().update(sqlId, param.get(i));
}
this.getSqlMapClient().executeBatch();
} catch (SQLException e) {
throw new DaoException(e);
}
}
}
}
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇MongoDB之旅(三)基本管理(Mong.. 下一篇MongoDB之旅(二)基本操作(Mong..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: