﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-TNT blog-文章分类-SPRING+HIBERNATE</title><link>http://www.blogjava.net/terrywu/category/11708.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 18:47:31 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 18:47:31 GMT</pubDate><ttl>60</ttl><item><title>在HQL里直接返回Interger值</title><link>http://www.blogjava.net/terrywu/articles/57373.html</link><dc:creator>吴志明</dc:creator><author>吴志明</author><pubDate>Sun, 09 Jul 2006 12:53:00 GMT</pubDate><guid>http://www.blogjava.net/terrywu/articles/57373.html</guid><wfw:comment>http://www.blogjava.net/terrywu/comments/57373.html</wfw:comment><comments>http://www.blogjava.net/terrywu/articles/57373.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/terrywu/comments/commentRss/57373.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/terrywu/services/trackbacks/57373.html</trackback:ping><description><![CDATA[
		<blockquote>
				<font color="#0000a0">
						<b>oldming wrote:</b>
						<br />用hibernateTemplate.find()是回傳list,但是如果我的HQL裡用到SUM,我該如何取得總計完的數值？ </font>
				<br />1)  (Integer) hibernateTemplate.find("...").get(0) ; <br />2) ( (Integer) session.iterate("select count(*) from ....").next() ).intValue();<br /></blockquote>
<img src ="http://www.blogjava.net/terrywu/aggbug/57373.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/terrywu/" target="_blank">吴志明</a> 2006-07-09 20:53 <a href="http://www.blogjava.net/terrywu/articles/57373.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>