org.figure8.join.businessobjects.commons.persistence
Class HibernateReleaseDao

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.commons.persistence.HibernateReleaseDao
All Implemented Interfaces:
ReleaseDao, ObjectDao, org.springframework.beans.factory.InitializingBean

public class HibernateReleaseDao
extends HibernateObjectDao
implements ReleaseDao

Implementation of ReleaseDao 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
HibernateReleaseDao()
          Creates a new instance of HibernateReleaseDao
 
Method Summary
 java.lang.Class getPersistentClass()
          Get the persistent class associated to this Dao.
 Release getRelease(java.lang.String name)
          Retrieve a release using its name
 Release getReleaseByNumbers(int major, int minor)
          Retrieve a release using its major and minor numbers
 void refreshCache()
          Refresh cache containing release objects.
 void save(EntityObject entityobject)
          Save the given entity into underlying datastore and put it into applicative cache dedicated to Releases if available.
 void setCacheManager(CacheManager manager)
          Release 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

HibernateReleaseDao

public HibernateReleaseDao()
Creates a new instance of HibernateReleaseDao

Method Detail

setCacheManager

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

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

refreshCache

public void refreshCache()
Refresh cache containing release objects. This consists in reloading cache content from datastore.

Specified by:
refreshCache in interface ReleaseDao

getRelease

public Release getRelease(java.lang.String name)
Retrieve a release using its name

Specified by:
getRelease in interface ReleaseDao
Parameters:
name - The name of the release
Returns:
Teh release or null if no release exists with this name

getReleaseByNumbers

public Release getReleaseByNumbers(int major,
                                   int minor)
Retrieve a release using its major and minor numbers

Specified by:
getReleaseByNumbers in interface ReleaseDao
Parameters:
major - The major number of the release to get
minor - The minor number of the release to get
Returns:
The release or null if no release exists with this numbers

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.commons.Release class

save

public void save(EntityObject entityobject)
Save the given entity into underlying datastore and put it into applicative cache dedicated to Releases 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.