1

我想知道如何为SqlMapClientTemplate. 具体来说,我可以进行批量调用。

4

1 回答 1

1

我这样做的方法是覆盖 SqlMapClientCallback<T>方法doInSqlMapClient

   SqlMapClientCallback<Integer> callback = new SqlMapClientCallback<Integer>() {
        public Integer doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
            executor.startBatch();
            //... do your queries here
            return executor.executeBatch();
        }
    };
于 2010-12-23T17:10:23.910 回答