????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回調(diào)接口定義。
- * 最后更新日期:2005年3月28日
- * @author cherami
- */
- publicinterfacePreparedStatementCallback {
- ? /**
- ?? * 定義PreparedStatement中的執(zhí)行內(nèi)容。
- ?? * 執(zhí)行前PreparedStatement的參數(shù)等內(nèi)容都已經(jīng)設(shè)置好了。
- ?? * @param stmt PreparedStatement
- ?? * @return 執(zhí)行的結(jié)果
- ?? * @throws SQLException
- ?? */
- ? publicObject doInPreparedStatement(PreparedStatement stmt) throwsSQLException;
- }
大盤預(yù)測 國富論