Interface SystemMessageDAO
-
- All Superinterfaces:
PersistentObjectDAO<SystemMessage>
- All Known Implementing Classes:
HibernateSystemMessageDAO
public interface SystemMessageDAO extends PersistentObjectDAO<SystemMessage>
This is a DAO service for SystemMessages.- Version:
- 1.0
- Author:
- Michael Scholz, Marco Meschieri
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteExpiredMessages(int type)
Removes all expired messages for the specified typevoid
deleteExpiredMessages(String recipient)
Removes all system expired messages for the specified recipientList<SystemMessage>
findByMode(String mode)
This method selects all the messages for the specified modeList<SystemMessage>
findByRecipient(String recipient, int type, Integer read)
This method selects all the messages for the specified recipient and typeList<SystemMessage>
findByType(int type)
This method selects all the messages for the specified typeList<SystemMessage>
findMessagesToBeSent(int type, int maxTrials)
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
getUnreadCount(String recipient, int type)
This methods gets the number of unread messages for the specified recipient and type.-
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForObject, queryForRowSet, queryForString, store
-
-
-
-
Method Detail
-
findByRecipient
List<SystemMessage> findByRecipient(String recipient, int type, Integer read)
This method selects all the messages for the specified recipient and type- Parameters:
recipient
- The recipient nametype
- The message typeread
- Optional flag- Returns:
- The messages list
-
getUnreadCount
int getUnreadCount(String recipient, int type)
This methods gets the number of unread messages for the specified recipient and type.- Parameters:
recipient
- The recipient nametype
- The message type- Returns:
- The number of messages
-
deleteExpiredMessages
void deleteExpiredMessages(String recipient)
Removes all system expired messages for the specified recipient- Parameters:
recipient
- The recipient
-
deleteExpiredMessages
void deleteExpiredMessages(int type)
Removes all expired messages for the specified type- Parameters:
type
- The message type
-
findByType
List<SystemMessage> findByType(int type)
This method selects all the messages for the specified type- Parameters:
type
- type of the message- Returns:
- The list of messages with the given type
-
findByMode
List<SystemMessage> findByMode(String mode)
This method selects all the messages for the specified mode- Parameters:
mode
- The message mode- Returns:
- The list of messages of the given mode
-
findMessagesToBeSent
List<SystemMessage> findMessagesToBeSent(int type, int maxTrials)
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')- Parameters:
type
- The message typemaxTrials
- The maximum number of sending trials- Returns:
- The list of messages of the given type
-
-