您的位置:程序门 -> java -> j2ee / ejb / jms



高手帮我看个程序赠20分


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


高手帮我看个程序赠20分[已结贴,结贴人:woshiyitouzhu]
发表于: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;
}
发表于:2007-09-21 14:38:211楼 得分:0
我在等高手的出现
发表于:2007-09-21 14:40:342楼 得分:0
我在等高手的出现
发表于:2007-09-21 15:06:593楼 得分:10
可以这样解释
form   term   as   tbl   where   tbl.strtermnum=entity.getstrtermnum()   and   tbl.strbranchnum   =entity.getstrbranchnum()   and   tbl.singstatus   > =   4   and   tbl.singstatus <=6
发表于:2007-09-21 15:07:184楼 得分:0
gei   fen   a
发表于:2007-09-21 17:29:535楼 得分:10
不给分,以后不会有人回答你的问题的,
这就叫做信誉~!

form   term   as   tbl   where   tbl.strtermnum=entity.getstrtermnum()   and   tbl.strbranchnum   =entity.getstrbranchnum()   and   (tbl.singstatus   between   4   and   6);
发表于:2007-09-21 18:16:406楼 得分:0
给分


快速检索

最新资讯