6 package org
.spirit
.dao
.impl
;
8 import org
.apache
.commons
.logging
.Log
;
9 import org
.apache
.commons
.logging
.LogFactory
;
10 import org
.hibernate
.HibernateException
;
11 import org
.hibernate
.Query
;
12 import org
.hibernate
.Session
;
13 import org
.spirit
.bean
.impl
.BotListLinkGroups
;
14 import org
.spirit
.dao
.BotListLinkGroupsDAO
;
15 import org
.springframework
.dao
.DataAccessException
;
16 import org
.springframework
.orm
.hibernate3
.HibernateCallback
;
17 import org
.springframework
.orm
.hibernate3
.support
.HibernateDaoSupport
;
20 * This is class is used by botverse.
22 * @author Berlin Brown
26 public class BotListLinkGroupsDAOImpl
extends HibernateDaoSupport
implements BotListLinkGroupsDAO
{
28 private Log log
= LogFactory
.getLog(getClass());
31 * @see org.spirit.dao.BotListCityListingDAO#readCityListing(int)
33 public BotListLinkGroups
readLinkGroup(final String genid
) throws DataAccessException
{
34 return (BotListLinkGroups
) getHibernateTemplate().execute(
35 new HibernateCallback() {
36 public Object
doInHibernate(Session session
) throws HibernateException
{
38 session
.createQuery("from org.spirit.bean.impl.BotListLinkGroups group where group.generatedId = :genid");
39 query
.setString("genid", genid
);
40 return query
.uniqueResult();