发布网友 发布时间:2022-04-22 16:31
共1个回答
热心网友 时间:2023-11-12 11:16
回调接口,用于与iBATIS的SqlMapExecutor接口工作数据访问代码。要使用与SqlMapClientTemplate的execute方法
例:
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor)
throws SQLException {
executor.startBatch();
for (Iterator iter = datas.iterator(); iter.hasNext();) {
Map data = (Map) iter.next();
executor.insert(statementName, data);
}
executor.executeBatch();
return null;
}
});