本文整理匯總了Java中org.apache.ibatis.executor.statement.StatementHandler.update方法的典型用法代碼示例。如果您正苦於以下問題:Java StatementHandler.update方法的具體用法?Java StatementHandler.update怎麽用?Java StatementHandler.update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.ibatis.executor.statement.StatementHandler
的用法示例。
在下文中一共展示了StatementHandler.update方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doUpdate
import org.apache.ibatis.executor.statement.StatementHandler; //導入方法依賴的package包/類
@Override
public int doUpdate(MappedStatement ms, Object parameter) throws SQLException {
Statement stmt = null;
try {
Configuration configuration = ms.getConfiguration();
//新建一個StatementHandler
//這裏看到ResultHandler傳入的是null
StatementHandler handler = configuration.newStatementHandler(this, ms, parameter, RowBounds.DEFAULT, null, null);
//準備語句
stmt = prepareStatement(handler, ms.getStatementLog());
//StatementHandler.update
return handler.update(stmt);
} finally {
closeStatement(stmt);
}
}
示例2: doUpdate
import org.apache.ibatis.executor.statement.StatementHandler; //導入方法依賴的package包/類
@Override
public int doUpdate(MappedStatement ms, Object parameter) throws SQLException {
Configuration configuration = ms.getConfiguration();
StatementHandler handler = configuration.newStatementHandler(this, ms, parameter, RowBounds.DEFAULT, null, null);
Statement stmt = prepareStatement(handler, ms.getStatementLog());
return handler.update(stmt);
}
示例3: doUpdate
import org.apache.ibatis.executor.statement.StatementHandler; //導入方法依賴的package包/類
@Override
public int doUpdate(MappedStatement ms, Object parameter) throws SQLException {
Statement stmt = null;
try {
Configuration configuration = ms.getConfiguration();
StatementHandler handler = configuration.newStatementHandler(this, ms, parameter, RowBounds.DEFAULT, null, null);
stmt = prepareStatement(handler, ms.getStatementLog());
return handler.update(stmt);
} finally {
closeStatement(stmt);
}
}
示例4: doUpdate
import org.apache.ibatis.executor.statement.StatementHandler; //導入方法依賴的package包/類
@Override
public int doUpdate(MappedStatement ms, Object parameter) throws SQLException {
Configuration configuration = ms.getConfiguration();
//和SimpleExecutor一樣,新建一個StatementHandler
//這裏看到ResultHandler傳入的是null
StatementHandler handler = configuration.newStatementHandler(this, ms, parameter, RowBounds.DEFAULT, null, null);
//準備語句
Statement stmt = prepareStatement(handler, ms.getStatementLog());
return handler.update(stmt);
}