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

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.HibernateResourceMappingDao
All Implemented Interfaces:
ResourceMappingDao, ObjectDao, org.springframework.beans.factory.InitializingBean

public class HibernateResourceMappingDao
extends HibernateObjectDao
implements ResourceMappingDao

Implementation of EnvironmentMappingDao using Hibernate ORM system.

Version:
$Revision: 1.3 $
Author:
Laurent Broudoux

Field Summary
 
Fields inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
logger
 
Constructor Summary
HibernateResourceMappingDao()
          Creates a new instance of HibernateResourceMappingDao.
 
Method Summary
 java.lang.Class getPersistentClass()
          Get the persistent class associated to this Dao.
 ResourceMapping getResourceMapping(long id)
          Retrieve the resource mapping having this identifier
 java.util.List getResourceMappingsForEnvironment(PhysicalEnvironment environment, java.util.Date date)
          Retrieve the list of resource mappings active for environment on specfied date
 java.util.List getResourceMappingsForEnvironment(PhysicalEnvironment environment, java.util.Date startDate, java.util.Date endDate)
          Retrieve a list of resource mappings done onto an environment during a specified interval.
 java.util.List getResourceMappingsForResource(AbstractResource resource, java.util.Date startDate, java.util.Date endDate)
          Retrieve a list of resource mappings done onto a resource during a specified interval
 
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

HibernateResourceMappingDao

public HibernateResourceMappingDao()
Creates a new instance of HibernateResourceMappingDao.

Method Detail

getResourceMapping

public ResourceMapping getResourceMapping(long id)
Retrieve the resource mapping having this identifier

Specified by:
getResourceMapping in interface ResourceMappingDao
Parameters:
id - The unique identifier of mapping to retrieve
Returns:
The ResourceMapping having this identifier or null if no one match

getResourceMappingsForResource

public java.util.List getResourceMappingsForResource(AbstractResource resource,
                                                     java.util.Date startDate,
                                                     java.util.Date endDate)
Retrieve a list of resource mappings done onto a resource during a specified interval

Specified by:
getResourceMappingsForResource in interface ResourceMappingDao
Parameters:
resource - The resource to retrieve mappings for
startDate - The starting date of time interval to search
endDate - The ending date of time interval to search
Returns:
A list of org.figure8.join.businessobjects.environment.ResourceMapping objects

getResourceMappingsForEnvironment

public java.util.List getResourceMappingsForEnvironment(PhysicalEnvironment environment,
                                                        java.util.Date date)
Retrieve the list of resource mappings active for environment on specfied date

Specified by:
getResourceMappingsForEnvironment in interface ResourceMappingDao
Parameters:
environment - The physical environment to retrieve mappings for
date - The date to retrieve active mappings
Returns:
A list of org.figure8.join.businessobjects.environment.ResourceMapping objects

getResourceMappingsForEnvironment

public java.util.List getResourceMappingsForEnvironment(PhysicalEnvironment environment,
                                                        java.util.Date startDate,
                                                        java.util.Date endDate)
Retrieve a list of resource mappings done onto an environment during a specified interval.

Specified by:
getResourceMappingsForEnvironment in interface ResourceMappingDao
Parameters:
environment - The physical environment to retrieve mappings for
startDate - The starting date of time interval to search
endDate - The ending date of time interval to search
Returns:
A list of org.figure8.join.businessobjects.environment.ResourceMapping objects

getPersistentClass

public java.lang.Class getPersistentClass()
Get the persistent class associated to this Dao.

Specified by:
getPersistentClass in interface ObjectDao
Returns:
The org.figure8.join.businessobjects.environment.ResourceMapping class


Copyright © 2005-2008 Join. All Rights Reserved.