????new PreparedStatementCallback(){
?????public Object doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {
??????ps.setString(1, "16068008");
??????ps.addBatch();
??????ps.setString(1, "6085555487");
??????ps.addBatch();
??????return ps.executeBatch();
?????}
??});
/**
- * Copyright: Copyright (c) 2005-2005
- * Company: JavaResearch(http://www.javaresearch.org)
- */
- package org.javaresearch.jerch;
- import java.sql.PreparedStatement;
- import java.sql.SQLException;
- /**
- * PreparedStatement回調接口定義。
- * 最后更新日期:2005年3月28日
- * @author cherami
- */
- publicinterfacePreparedStatementCallback {
- ? /**
- ?? * 定義PreparedStatement中的執行內容。
- ?? * 執行前PreparedStatement的參數等內容都已經設置好了。
- ?? * @param stmt PreparedStatement
- ?? * @return 執行的結果
- ?? * @throws SQLException
- ?? */
- ? publicObject doInPreparedStatement(PreparedStatement stmt) throwsSQLException;
- }
大盤預測 國富論