67,512
社区成员
发帖
与我相关
我的任务
分享
//ibatis batch 示例
protected void batchCreate(final List<T> memberList, final String statement) {
SqlMapClientCallback callback = new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
executor.startBatch();
for (T tObject : memberList) {
executor.insert(statement, tObject); // statement在*MapSql.xml一条语句的id
}
executor.executeBatch();
return null;
}
};