public void updateCustomList(CustomList customList) {
Session session = customListDAO.getSession();
Transaction trans = null;
try{
trans = session.beginTransaction();
customListDAO.merge(customList);
trans.commit();
}catch(RuntimeException re){
trans.rollback();
}finally{
session.close();
}
}
解决方案 »
- The method getActualTypeArguments() is undefined for the type ParameterizedType
- 那位做过贝宝的API接口跟小弟交流下!!
- myeclipse部署hibernate应用时 那些hibernate库文件怎么不自动添加到应用的lib目录下
- 多么希望找到一个osworkflow完成的网上审批的完整例子?
- <bean:write>问题--24h结帖
- 如何配置j2ee环境变量?
- 请教j2ee1.4 tutorial上的例子遇到的问题.
- 一个关于struts的问题!!!
- 我想学Structs,请问有什么好的入门教程吗?谢谢!!!
- xstream.fromXML转换错误
- 公司打算在开源项目wildfire + spark IM的基础上二次开发,有经验的朋友给些建议!
- 请教大家一个问题,就是model与vo转换的问题,我们在表现层中使用model装载数据,然后在持久层中(如Hibernate)使用VO装载数据,现在持
import com.jfsuite.util.db.BaseHibernateDAO;public class CustomListDAO extends BaseHibernateDAO { private static final String LOAD_ALL = "from CustomList"; public List findAll() {
Query queryObject = getSession().createQuery(LOAD_ALL);
return queryObject.list();
} public CustomList findById(Integer id) {
return (CustomList) getSession().get(CustomList.class, id);
} public void save(CustomList customList) {
getSession().saveOrUpdate(customList);
}
public void delete(CustomList customList){
getSession().delete(customList);
}
public void delete(Integer id){
getSession().delete(findById(id));
}}
是不是你缓存页面了?
不要缓存页面试试>>>该怎么设置?