public class HibernateSystemMessageDAO extends HibernatePersistentObjectDAO<SystemMessage> implements SystemMessageDAO
SystemMessageDAO| Modifier and Type | Class and Description | 
|---|---|
| class  | HibernateSystemMessageDAO.SystemMessageMapper | 
entityClass, log, sessionFactory| Constructor and Description | 
|---|
| HibernateSystemMessageDAO() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected List<SystemMessage> | collectGarbage(Collection<SystemMessage> coll,
              boolean removeExpired)Cleans from the passed collection all expired messages | 
| void | deleteExpiredMessages(int type)Removes all expired messages for the specified type | 
| void | deleteExpiredMessages(String recipient)Removes all system expired messages for the specified recipient | 
| List<SystemMessage> | findByMode(String mode)This method selects all the messages for the specified mode | 
| List<SystemMessage> | findByRecipient(String recipient,
               int type,
               Integer read)This method selects all the messages for the specified recipient and type | 
| List<SystemMessage> | findByType(int type)This method selects all the messages for the specified type | 
| List<SystemMessage> | findMessagesToBeSent(int type,
                    int maxTrial)This method selects all the messages for the specified type that are not
 been already sent and for which the number of sending trials is less than
 the maximum number (parameter 'notifier.maxtrials') | 
| int | getCount(String recipient,
        int type,
        Integer read)This methods gets the number of messages for the specified recipient and
 type, and optionally a specified read flag | 
| void | initialize(SystemMessage message)Doesn't do anything by default | 
bulkUpdate, delete, deleteAll, evict, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, flush, getConnection, getCurrentSession, getDbms, getSessionFactory, isHsql, isMySQL, isOracle, isSqlServer, jdbcUpdate, jdbcUpdate, merge, prepareQuery, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet, refresh, saveOrUpdate, setSessionFactory, storeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbulkUpdate, delete, deleteAll, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet, storepublic List<SystemMessage> findByRecipient(String recipient, int type, Integer read)
SystemMessageDAOfindByRecipient in interface SystemMessageDAOrecipient - The recipient nametype - The message typeread - Optional flagcom.logicaldoc.core.communication.SystemMessageDAO#findByRecipient(java.lang.String,
      int)public int getCount(String recipient, int type, Integer read)
SystemMessageDAOgetCount in interface SystemMessageDAOrecipient - The recipient nametype - The message typeread - Optional flagcom.logicaldoc.core.communication.SystemMessageDAO#getCount(java.lang.String,
      int)public void deleteExpiredMessages(String recipient)
SystemMessageDAOdeleteExpiredMessages in interface SystemMessageDAOrecipient - The recipientSystemMessageDAO.deleteExpiredMessages(java.lang.String)protected List<SystemMessage> collectGarbage(Collection<SystemMessage> coll, boolean removeExpired)
coll - The input messagesremoveExpired - True if expired messages must be deletedpublic void deleteExpiredMessages(int type)
SystemMessageDAOdeleteExpiredMessages in interface SystemMessageDAOtype - The message typeSystemMessageDAO.deleteExpiredMessages(int)public List<SystemMessage> findByMode(String mode)
SystemMessageDAOfindByMode in interface SystemMessageDAOmode - The message modepublic List<SystemMessage> findByType(int type)
SystemMessageDAOfindByType in interface SystemMessageDAOpublic void initialize(SystemMessage message)
HibernatePersistentObjectDAOinitialize in interface PersistentObjectDAO<SystemMessage>initialize in class HibernatePersistentObjectDAO<SystemMessage>message - The entity to be initialisedpublic List<SystemMessage> findMessagesToBeSent(int type, int maxTrial)
SystemMessageDAOfindMessagesToBeSent in interface SystemMessageDAOtype - The message typemaxTrial - The maximum number of sending trialsCopyright © 2008-2014 Logical Objects. All Rights Reserved.