因为更新语句的where条件不一定存在
我想知道到底更了数据没有,就像int rows = prepareStatement.executeUpdate();这样
但是,mybaits使用配置方式的的update的返回是void,那我怎么做呢?
我想知道到底更了数据没有,就像int rows = prepareStatement.executeUpdate();这样
但是,mybaits使用配置方式的的update的返回是void,那我怎么做呢?
解决方案 »
- 如何查找服务器上的JSP文件
- 哪位大侠帮忙看一下,DWR3 推消息到页面,死活推不过去....
- 有关Spring属性注入的问题
- 求高手讲解下transaction
- 菜鸟问题--struts的帮助xml文件用什么查看
- 求助:dom4j逐层添加子元素问题
- hibernate 运行时报PropertyNotFoundException错误,但我都设了set/get ,请高手帮忙看一下
- 各位大哥小弟开始java+flash的聊天室,谁能给个思路!
- 关于会话Bean和实体Bean?都有分
- idea中rerun的提示弹窗怎么调出来,之前手贱给点没了!
- 倾家荡产的问个spring2.5注解事务问题,在线等
- linux下定时自动运行JAVA程序
下面是源码
public Object insert(final String statementName, final Object parameterObject)
throws DataAccessException { return execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
return executor.insert(statementName, parameterObject);
}
});
} public int update(String statementName) throws DataAccessException {
return update(statementName, null);
} public int update(final String statementName, final Object parameterObject)
throws DataAccessException { Integer result = (Integer) execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
return new Integer(executor.update(statementName, parameterObject));
}
});
return result.intValue();
}