org.figure8.join.businessobjects.security.persistence
Class HibernateRoleDao

java.lang.Object
  extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
      extended by org.figure8.join.core.persistence.HibernateObjectDao
          extended by org.figure8.join.businessobjects.security.persistence.HibernateRoleDao
All Implemented Interfaces:
RoleDao, ObjectDao, org.springframework.beans.factory.InitializingBean

public class HibernateRoleDao
extends HibernateObjectDao
implements RoleDao

Implementation of RoleDao using Hibernate ORM system.

Version:
$Revision: 1.1 $
Author:
Laurent Broudoux

Field Summary
 
Fields inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
logger
 
Constructor Summary
HibernateRoleDao()
          Creates a new instance of HibernateRoleDao.
 
Method Summary
 java.lang.Class getPersistentClass()
          Get the persistent class associated to this Dao.
 Role getRole(long id)
          Retrieve a security role using its identifier
 Role getRole(java.lang.String name)
          Retrieve a security role using its name
 void save(EntityObject entityobject)
          Save the given entity into underlying datastore and put it into applicative cache dedicated to Roles if available.
 void setCacheManager(CacheManager manager)
          Role data access object may want to use the cache manager for storing and retrieving releases.
 
Methods inherited from class org.figure8.join.core.persistence.HibernateObjectDao
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getById, initialize, initializeAssociation, isInitialized, refresh, remove, replicate
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
afterPropertiesSet, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, initDao, setHibernateTemplate, setSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.figure8.join.core.persistence.ObjectDao
findAll, findAllSorted, initialize, initializeAssociation, isInitialized, refresh, remove, replicate
 

Constructor Detail

HibernateRoleDao

public HibernateRoleDao()
Creates a new instance of HibernateRoleDao.

Method Detail

setCacheManager

public void setCacheManager(CacheManager manager)
Role data access object may want to use the cache manager for storing and retrieving releases. This Cache service provides an eternal cache for role objects.

Specified by:
setCacheManager in interface RoleDao
Parameters:
manager - The CacheManager implementation to use.

getRole

public Role getRole(long id)
Retrieve a security role using its identifier

Specified by:
getRole in interface RoleDao
Parameters:
id - The unique identifier of Role within datastore
Returns:
The role or null if no role exists with this id

getRole

public Role getRole(java.lang.String name)
Retrieve a security role using its name

Specified by:
getRole in interface RoleDao
Parameters:
name - The name of the role
Returns:
The role or null if no role exists with this name

getPersistentClass

public java.lang.Class getPersistentClass()
Description copied from interface: ObjectDao
Get the persistent class associated to this Dao.

Specified by:
getPersistentClass in interface ObjectDao
Returns:
org.figure8.join.businessobjects.security.Role class

save

public void save(EntityObject entityobject)
Save the given entity into underlying datastore and put it into applicative cache dedicated to Roles if available.

Specified by:
save in interface ObjectDao
Overrides:
save in class HibernateObjectDao
Parameters:
entityobject - EntityObject to save


Copyright © 2005-2008 Join. All Rights Reserved.