| 发表于:2007-09-21 14:35:18 楼主 |
如题,请指出try中的语句功能 public final term createterm(final term entity) { session session = hibernateutil.getsession(); hibernateutil.begintransaction(); term bean = new term(); try { bean = (term) session.createcriteria(term.class) .add(expression.eq( "strtermnum ", entity.getstrtermnum())) .add(expression.eq( "strbranchnum ", entity.getstrbranchnum())) .add(expression.between( "singstatus ", new integer(4), new integer(6))).uniqueresult(); hibernateutil.committransaction(); } catch (hibernateexception err) { loggerutil.error(err); hibernateutil.rollbacktransaction(); } finally { hibernateutil.closesession(); } return bean; } |
|
|
|
|