-
/**
-
* Copyright: Copyright (c) 2005-2005
-
* Company: JavaResearch(http://www.javaresearch.org)
-
*/
-
package
org.javaresearch.jerch;
-
-
-
-
import
java.sql.PreparedStatement;
-
import
java.sql.SQLException;
-
-
/**
-
* 批量更新時設(shè)置PreparedStatement的值的接口定義。
-
* 最后更新日期:2005年3月25日
-
* @author cherami
-
*/
-
public
interface
BatchPreparedStatementSetter
{
- ? /**
-
?? * 得到批次的總次數(shù)。
-
?? * @return 批次的總次數(shù)
-
?? */
- ? publicint getBatchSize();
-
- ? /**
-
?? * 設(shè)置第i次的值。
-
?? * 請注意它是針對每一次設(shè)置值的,
-
?? * 如果所有的值不是保存在一個List類型的可以通過索引訪問的集合中,
-
?? * 那么這個方法的實(shí)現(xiàn)中可能需要使用switch或者if語句進(jìn)行判斷。
-
?? * 你可以考慮使用PreparedStatementSetter一次性設(shè)置全部的批次。
-
?? * @param ps PreparedStatement
-
?? * @param i 執(zhí)行批次
-
?? * @throws SQLException
-
?? */
- ? publicvoid setValues(PreparedStatement ps, int i) throwsSQLException;
- }
大盤預(yù)測
國富論
posted on 2007-09-10 11:21
華夢行 閱讀(1087)
評論(0) 編輯 收藏