|
public void attachDirty(Test instance) {
log.debug("attaching dirty Test instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(Test instance) {
log.debug("attaching clean Test instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
这两个方法是做什么的哦,我测试了一下,没有什么变动呢 |
|