net.ramapuram.thomas.dao.hibernate
Class RoleDaoHibernate

java.lang.Object
  extended by net.ramapuram.thomas.dao.hibernate.GenericDaoHibernate<Role,java.lang.Long>
      extended by net.ramapuram.thomas.dao.hibernate.RoleDaoHibernate
All Implemented Interfaces:
GenericDao<Role,java.lang.Long>, RoleDao

@Repository
public class RoleDaoHibernate
extends GenericDaoHibernate<Role,java.lang.Long>
implements RoleDao

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

Author:
Bryan Noll

Field Summary
 
Fields inherited from class net.ramapuram.thomas.dao.hibernate.GenericDaoHibernate
log
 
Constructor Summary
RoleDaoHibernate()
          Constructor to create a Generics-based version using Role as the entity
 
Method Summary
 Role getRoleByName(java.lang.String rolename)
          Gets role information based on rolename
 void removeRole(java.lang.String rolename)
          Removes a role from the database by name
 
Methods inherited from class net.ramapuram.thomas.dao.hibernate.GenericDaoHibernate
exists, findByNamedQuery, get, getAll, getAllDistinct, getHibernateTemplate, getSessionFactory, remove, save, setSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.ramapuram.thomas.dao.GenericDao
exists, findByNamedQuery, get, getAll, getAllDistinct, remove, save
 

Constructor Detail

RoleDaoHibernate

public RoleDaoHibernate()
Constructor to create a Generics-based version using Role as the entity

Method Detail

getRoleByName

public Role getRoleByName(java.lang.String rolename)
Gets role information based on rolename

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

removeRole

public void removeRole(java.lang.String rolename)
Removes a role from the database by name

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


Copyright © 2011. All Rights Reserved.