org.figure8.join.businessobjects.reporting.persistence
Class HibernateMessageDao

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.reporting.persistence.HibernateMessageDao
All Implemented Interfaces:
MessageDao, ObjectDao, org.springframework.beans.factory.InitializingBean

public class HibernateMessageDao
extends HibernateObjectDao
implements MessageDao

Implementation of MessageDao 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
HibernateMessageDao()
          Create a new instance of HibernateMessageDao.
 
Method Summary
 Message getMessage(long id)
          Retrieve a message using its unique identifier
 java.util.List getMessages(java.util.Date startDate, java.util.Date endDate)
          Retrieve all messages published between publication date and expiry date
 java.util.List getMessagesForRelease(Release release, java.util.Date startDate, java.util.Date endDate)
          Retrieve all messages published between publication date and expiry date for a specified release.
 java.util.List getOpenMessages()
          Retrieve all current messages at time of invocation
 java.util.List getOpenMessagesForRelease(Release release)
          Retrieve all current messages that are associated to release at time of invocation
 java.lang.Class getPersistentClass()
          Get the persistent class associated to this Dao.
 
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

HibernateMessageDao

public HibernateMessageDao()
Create a new instance of HibernateMessageDao.

Method Detail

getMessage

public Message getMessage(long id)
Retrieve a message using its unique identifier

Specified by:
getMessage in interface MessageDao
Parameters:
id - The unique identifier of message to retrieve
Returns:
The message having this id or null if it does not exists

getOpenMessages

public java.util.List getOpenMessages()
Retrieve all current messages at time of invocation

Specified by:
getOpenMessages in interface MessageDao
Returns:
A list of org.figure8.join.businessobjects.reporting.Messages

getOpenMessagesForRelease

public java.util.List getOpenMessagesForRelease(Release release)
Retrieve all current messages that are associated to release at time of invocation

Specified by:
getOpenMessagesForRelease in interface MessageDao
Parameters:
release - The release to retrieve messages for
Returns:
A list of org.figure8.join.businessobjects.reporting.Messages for this release

getMessages

public java.util.List getMessages(java.util.Date startDate,
                                  java.util.Date endDate)
Retrieve all messages published between publication date and expiry date

Specified by:
getMessages in interface MessageDao
Parameters:
startDate - Start date of messages research
endDate - End date of messages research
Returns:
A list of org.figure8.join.businessobjects.reporting.Messages

getMessagesForRelease

public java.util.List getMessagesForRelease(Release release,
                                            java.util.Date startDate,
                                            java.util.Date endDate)
Retrieve all messages published between publication date and expiry date for a specified release.

Specified by:
getMessagesForRelease in interface MessageDao
Parameters:
release - The release to retrieve messages for
startDate - Start date of messages research
endDate - End date of messages research
Returns:
A list of org.figure8.join.businessobjects.reporting.Messages

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:
The org.figure8.join.businessobjects.reporting.Message class


Copyright © 2005-2008 Join. All Rights Reserved.