* @param site
* @param count
* @return
*/
public static List listHotTags(int site, int count){
Session ssn = getSession();
StringBuffer sql = new StringBuffer("SELECT tag_name,COUNT(*) FROM dlog_tag");
if(site>0)
sql.append(" WHERE site_id=?");
sql.append(" GROUP BY tag_name ORDER BY 2 DESC");
SQLQuery query = ssn.createSQLQuery(sql.toString());
if(site>0)
query.setInteger(0, site);
query.setMaxResults(count);
List tags = new ArrayList();
List results = query.list();