接口 CommonDao(公共Dao提供增删改查方法 saveOrUpdate)

void saveOrUpdate(java.lang.Object entity)
                  throws java.lang.Exception

保存或更新po对象.

参数:

entity - po对象实例

抛出:

java.lang.Exception

 public void saveOrUpdate(Object entity)throws Exception{
       sessionFactory.getCurrentSession().saveOrUpdate(entity);
   }

猜你喜欢

转载自blog.csdn.net/gongjian0321/article/details/89003620