org.figure8.join.businessobjects.environment.persistence
Class HibernateResourceDao

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.environment.persistence.HibernateResourceDao
All Implemented Interfaces:
ResourceDao, ObjectDao, org.springframework.beans.factory.InitializingBean

public class HibernateResourceDao
extends HibernateObjectDao
implements ResourceDao

Implementation of ResourceDao using Hibernate ORM system.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
 
Fields inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
logger
 
Constructor Summary
HibernateResourceDao()
          Creates a new instance of HibernateResourceDao.
 
Method Summary
 java.lang.Class getPersistentClass()
          Get the persistent class associated to this Dao.
 Resource getResource(long id)
          Retrieve a Resource using its identifier
 Resource getResource(java.lang.String name)
          Retrieve a Resource using its name
 java.util.List getResourcesByCategory(java.lang.String category)
          Retrieve all Resources corresponding to a specified category of resources
 java.util.List getResourcesByType(AbstractResourceType type)
          Retrieve all Resource corresponding to a specified type of resources
 
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, save
 
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, save
 

Constructor Detail

HibernateResourceDao

public HibernateResourceDao()
Creates a new instance of HibernateResourceDao.

Method Detail

getResource

public Resource getResource(long id)
Retrieve a Resource using its identifier

Specified by:
getResource in interface ResourceDao
Parameters:
id - The unique identifier of this resource
Returns:
The corresponding resource or null if no resource has this id

getResource

public Resource getResource(java.lang.String name)
Retrieve a Resource using its name

Specified by:
getResource in interface ResourceDao
Parameters:
name - The name of Resource to retrieve
Returns:
The corresponding resouce or null if no resource has this name

getResourcesByCategory

public java.util.List getResourcesByCategory(java.lang.String category)
Retrieve all Resources corresponding to a specified category of resources

Specified by:
getResourcesByCategory in interface ResourceDao
Parameters:
category - The string representing the category of resource (Service, Gwateway, ..)
Returns:
A list of Resource corresponding to this category

getResourcesByType

public java.util.List getResourcesByType(AbstractResourceType type)
Retrieve all Resource corresponding to a specified type of resources

Specified by:
getResourcesByType in interface ResourceDao
Parameters:
type - The resource type of Resources to retrieve (only persistent types are supported at that time)
Returns:
A list of Resource corresponding to this type

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.environment.AbstractResource class


Copyright © 2005-2008 Join. All Rights Reserved.