呵呵,不用hibernate当然可以实现,这个我知道所以我问在hibernate里能不能实现嘛?不过直接通过hibernate实现的话,又没有通过hibernate的变通一下的办法啊?
解决方案 »
- Class<?>... classes
- 离开页面前提醒数据会丢失的问题,关于onbeforeunload
- 这是什么异常?
- 如何把文本写入数据库的过滤掉一些HTML符号?
- 结合spring,hibernate的缓存?
- 如何从数据库中读出文件并作为附件用JAVA MAIL发送出去?
- Struts+Ibatis+Spring 整合报错
- 标准问题!急迫想知道答案
- 请问怎么用socket发送消息到com口,请各位高手指教下,或者给一个思路给小弟吧,非常感谢
- 向字符串中写了一个xml,如何将它转换成一个dom好进行xsl转换?
- 请问有哪位高人用过resin呀!!怎么配置第一个helloservlet
- <html-el:checkbox 如何被选中
假如我们创建了以下存储过程:
create or replace procedure batchUpdateCustomer(p_age in number) as
begin
update CUSTOMERS set AGE=AGE+1 where AGE>p_age;
end;
存储过程中有一个参数p_age,代表客户的年龄,应用程序可按照以下方式调用存储过程:
代码内容
tx = session.beginTransaction();
Connection con=session.connection();
String procedure = "{call batchUpdateCustomer(?) }";
CallableStatement cstmt = con.prepareCall(procedure);
cstmt.setInt(1,0); //把年龄参数设为0
cstmt.executeUpdate();
tx.commit();