org.appfuse.dao.hibernate
Class RoleDaoHibernate

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by org.appfuse.dao.hibernate.BaseDaoHibernate
              extended by org.appfuse.dao.hibernate.RoleDaoHibernate
All Implemented Interfaces:
Dao, RoleDao, InitializingBean

public class RoleDaoHibernate
extends BaseDaoHibernate
implements RoleDao

This class interacts with Spring's HibernateTemplate to save/delete and retrieve Role objects.

View Source

Author:
Dan Kibler

Field Summary
 
Fields inherited from class org.appfuse.dao.hibernate.BaseDaoHibernate
log
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
RoleDaoHibernate()
           
 
Method Summary
 Role getRole(Long roleId)
           
 Role getRoleByName(String rolename)
          Gets role information based on rolename
 List getRoles(Role role)
          Gets a list of roles based on parameters passed in.
 void removeRole(String rolename)
          Removes a role from the database by name
 void saveRole(Role role)
          Saves a role's information
 
Methods inherited from class org.appfuse.dao.hibernate.BaseDaoHibernate
getObject, getObjects, removeObject, saveObject
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.appfuse.dao.Dao
getObject, getObjects, removeObject, saveObject
 

Constructor Detail

RoleDaoHibernate

public RoleDaoHibernate()
Method Detail

getRoles

public List getRoles(Role role)
Description copied from interface: RoleDao
Gets a list of roles based on parameters passed in.

Specified by:
getRoles in interface RoleDao
Returns:
List populated list of roles

getRole

public Role getRole(Long roleId)

getRoleByName

public Role getRoleByName(String rolename)
Description copied from interface: RoleDao
Gets role information based on rolename

Specified by:
getRoleByName in interface RoleDao
Parameters:
rolename - the rolename
Returns:
role populated role object

saveRole

public void saveRole(Role role)
Description copied from interface: RoleDao
Saves a role's information

Specified by:
saveRole in interface RoleDao
Parameters:
role - the object to be saved

removeRole

public void removeRole(String rolename)
Description copied from interface: RoleDao
Removes a role from the database by name

Specified by:
removeRole in interface RoleDao
Parameters:
rolename - the role's rolename


Copyright � 2002-2006