Class HibernateSystemMessageDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<SystemMessage>
com.logicaldoc.core.communication.HibernateSystemMessageDAO
- All Implemented Interfaces:
- SystemMessageDAO,- PersistentObjectDAO<SystemMessage>
@Repository("systemMessageDAO")
public class HibernateSystemMessageDAO
extends HibernatePersistentObjectDAO<SystemMessage>
implements SystemMessageDAO
Hibernate implementation of 
SystemMessageDAO- Since:
- 3.0
- Author:
- Marco Meschieri - LogicalDOC
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeleteExpiredMessages(int type) Removes all expired messages for the specified typevoiddeleteExpiredMessages(String recipient) Removes all system expired messages for the specified recipientfindByMode(String mode) This method selects all the messages for the specified modefindByRecipient(String recipient, int type, Integer read) This method selects all the messages for the specified recipient and typefindByType(int type) This method selects all the messages for the specified typefindMessagesToBeSent(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')intgetUnreadCount(String recipient, int type) This methods gets the number of unread messages for the specified recipient and type.voidinitialize(SystemMessage message) Doesn't do anything by defaultvoidstore(SystemMessage message) This method persists the entity objectMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, setSessionFactoryMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString
- 
Constructor Details- 
HibernateSystemMessageDAOpublic HibernateSystemMessageDAO()
 
- 
- 
Method Details- 
findByRecipientpublic List<SystemMessage> findByRecipient(String recipient, int type, Integer read) throws PersistenceException Description copied from interface:SystemMessageDAOThis method selects all the messages for the specified recipient and type- Specified by:
- findByRecipientin interface- SystemMessageDAO
- Parameters:
- recipient- The recipient name
- type- The message type
- read- Optional flag
- Returns:
- The messages list
- Throws:
- PersistenceException- @throws PersistenceException Error in the database
 
- 
getUnreadCountDescription copied from interface:SystemMessageDAOThis methods gets the number of unread messages for the specified recipient and type.- Specified by:
- getUnreadCountin interface- SystemMessageDAO
- Parameters:
- recipient- The recipient name
- type- The message type
- Returns:
- The number of messages
- Throws:
- PersistenceException- Error in the database
 
- 
deleteExpiredMessagesDescription copied from interface:SystemMessageDAORemoves all system expired messages for the specified recipient- Specified by:
- deleteExpiredMessagesin interface- SystemMessageDAO
- Parameters:
- recipient- The recipient
- Throws:
- PersistenceException- Error in the database
 
- 
deleteExpiredMessagesDescription copied from interface:SystemMessageDAORemoves all expired messages for the specified type- Specified by:
- deleteExpiredMessagesin interface- SystemMessageDAO
- Parameters:
- type- The message type
- Throws:
- PersistenceException- Error in the database
 
- 
findByModeDescription copied from interface:SystemMessageDAOThis method selects all the messages for the specified mode- Specified by:
- findByModein interface- SystemMessageDAO
- Parameters:
- mode- The message mode
- Returns:
- The list of messages of the given mode
- Throws:
- PersistenceException- Error in the database
 
- 
findByTypeDescription copied from interface:SystemMessageDAOThis method selects all the messages for the specified type- Specified by:
- findByTypein interface- SystemMessageDAO
- Parameters:
- type- type of the message
- Returns:
- The list of messages with the given type
- Throws:
- PersistenceException- Error in the database
 
- 
initializeDescription copied from class:HibernatePersistentObjectDAODoesn't do anything by default- Specified by:
- initializein interface- PersistentObjectDAO<SystemMessage>
- Overrides:
- initializein class- HibernatePersistentObjectDAO<SystemMessage>
- Parameters:
- message- The entity to be initialised
 
- 
findMessagesToBeSentDescription copied from interface:SystemMessageDAOThis 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')- Specified by:
- findMessagesToBeSentin interface- SystemMessageDAO
- Parameters:
- type- The message type
- maxTrial- The maximum number of sending trials
- Returns:
- The list of messages of the given type
- Throws:
- PersistenceException- Error in the database
 
- 
storeDescription copied from interface:PersistentObjectDAOThis method persists the entity object- Specified by:
- storein interface- PersistentObjectDAO<SystemMessage>
- Overrides:
- storein class- HibernatePersistentObjectDAO<SystemMessage>
- Parameters:
- message- entity to be stored
- Throws:
- PersistenceException- raised in case of errors in the database
 
 
-