Question

Je voudrais savoir comment créer mon propre rappel pour un SqlMapClientTemplate. Plus précisément, je peux faire des appels de traitement par lots.

Était-ce utile?

La solution

La façon dont je le faire est de remplacer la méthode 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();
        }
    };
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top