Package com.logicaldoc.chat
Interface ChatMessageDAO
- All Superinterfaces:
- com.logicaldoc.core.PersistentObjectDAO<ChatMessage>
- All Known Implementing Classes:
- HibernateChatMessageDAO
DAO for 
ChatMessage handling.- Author:
- Marco Meschieri - LogicalDOC
- 
Field SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier and TypeMethodDescriptionvoidcleanOldMessages(int ttl) This method deletes all the chat entries oldest than the given days from now.findLatest(long tenantId, Integer max) This method selects all latest messagesMethods 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, initialize, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
- 
Method Details- 
findLatestList<ChatMessage> findLatest(long tenantId, Integer max) throws com.logicaldoc.core.PersistenceException This method selects all latest messages- Parameters:
- tenantId- identifier of the tenant
- max- optional maximum number of records
- Returns:
- list of messages ordered by descending date
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the data layer
 
- 
cleanOldMessagesvoid cleanOldMessages(int ttl) throws com.logicaldoc.core.PersistenceException This method deletes all the chat entries oldest than the given days from now. Ifttlis 0 or -1, the cancellation is not made- Parameters:
- ttl- The maximum number of days over which the history is considered old
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the data layer
 
 
-