org.telscenter.sail.webapp.dao.message.impl
Class HibernateMessageDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by net.sf.sail.webapp.dao.impl.AbstractHibernateDao<Message>
              extended by org.telscenter.sail.webapp.dao.message.impl.HibernateMessageDao
All Implemented Interfaces:
SimpleDao<Message>, org.springframework.beans.factory.InitializingBean, MessageDao<Message>

public class HibernateMessageDao
extends AbstractHibernateDao<Message>
implements MessageDao<Message>

Version:
$Id:$
Author:
hirokiterashima

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateMessageDao()
           
 
Method Summary
protected  Class<MessageImpl> getDataObjectClass()
          Gets the class of the persistent entity.
protected  String getFindAllQuery()
          Gets a string that will perform a query to retrieve all available objects from the persistent data store.
 List<Message> getListByRecipient(User recipient)
          Retrieves all (read and unread) messages for recipient
 List<Message> getListByRecipient(User recipient, boolean isRead)
          Retrieves read or unread messages for recipient
 List<Message> getListBySender(User sender)
          Retrieves all messages that the specified user has sent.
 List<Message> retrieveByField(String field, String type, Object term)
           
 
Methods inherited from class net.sf.sail.webapp.dao.impl.AbstractHibernateDao
delete, getById, getList, save
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.sail.webapp.dao.SimpleDao
delete, getById, getList, save
 

Constructor Detail

HibernateMessageDao

public HibernateMessageDao()
Method Detail

getDataObjectClass

protected Class<MessageImpl> getDataObjectClass()
Description copied from class: AbstractHibernateDao
Gets the class of the persistent entity.

Specified by:
getDataObjectClass in class AbstractHibernateDao<Message>
Returns:
the Class

getFindAllQuery

protected String getFindAllQuery()
Description copied from class: AbstractHibernateDao
Gets a string that will perform a query to retrieve all available objects from the persistent data store.

Specified by:
getFindAllQuery in class AbstractHibernateDao<Message>
Returns:
String query

getListByRecipient

public List<Message> getListByRecipient(User recipient)
Description copied from interface: MessageDao
Retrieves all (read and unread) messages for recipient

Specified by:
getListByRecipient in interface MessageDao<Message>
Returns:

getListByRecipient

public List<Message> getListByRecipient(User recipient,
                                        boolean isRead)
Description copied from interface: MessageDao
Retrieves read or unread messages for recipient

Specified by:
getListByRecipient in interface MessageDao<Message>
isRead - true iff messages to retrieve has been read. Otherwise, retrieve only unread messages.
Returns:

getListBySender

public List<Message> getListBySender(User sender)
Description copied from interface: MessageDao
Retrieves all messages that the specified user has sent.

Specified by:
getListBySender in interface MessageDao<Message>
Returns:

retrieveByField

public List<Message> retrieveByField(String field,
                                     String type,
                                     Object term)


Copyright © 2012. All Rights Reserved.