本文整理汇总了Java中org.springframework.orm.ibatis.SqlMapClientTemplate.delete方法的典型用法代码示例。如果您正苦于以下问题:Java SqlMapClientTemplate.delete方法的具体用法?Java SqlMapClientTemplate.delete怎么用?Java SqlMapClientTemplate.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.orm.ibatis.SqlMapClientTemplate
的用法示例。
在下文中一共展示了SqlMapClientTemplate.delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteShouldBeTraced
import org.springframework.orm.ibatis.SqlMapClientTemplate; //导入方法依赖的package包/类
@Test
public void deleteShouldBeTraced() throws Exception {
// Given
final String deleteId = "deleteId";
SqlMapClientTemplate clientTemplate = new SqlMapClientTemplate(this.mockDataSource, this.sqlMapClient);
// When
clientTemplate.delete(deleteId);
clientTemplate.delete(deleteId, new Object());
clientTemplate.delete(deleteId, new Object(), 0);
// Then
PluginTestVerifier verifier = PluginTestVerifierHolder.getInstance();
Method delete1 = SqlMapClientTemplate.class.getDeclaredMethod("delete", String.class);
Method delete2 = SqlMapClientTemplate.class.getDeclaredMethod("delete", String.class, Object.class);
Method delete3 = SqlMapClientTemplate.class.getDeclaredMethod("delete", String.class, Object.class, int.class);
verifier.verifyTrace(event("IBATIS_SPRING", delete1, Expectations.cachedArgs(deleteId)));
verifier.verifyTrace(event("IBATIS_SPRING", delete2, Expectations.cachedArgs(deleteId)));
verifier.verifyTrace(event("IBATIS_SPRING", delete3, Expectations.cachedArgs(deleteId)));
}
示例2: delete
import org.springframework.orm.ibatis.SqlMapClientTemplate; //导入方法依赖的package包/类
/**
* 削除を実行する.
* @param queryId クエリーID
* @return 削除行数
*/
public int delete(String queryId) {
SqlMapClientTemplate sqlMapClient = getSqlMapClientTemplate();
int result = sqlMapClient.delete(queryId);
return result;
}