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, store
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bulkUpdate, delete, deleteAll, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet, store
public List<SystemMessage> findByRecipient(String recipient, int type, Integer read)
SystemMessageDAO
findByRecipient
in interface SystemMessageDAO
recipient
- 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)
SystemMessageDAO
getCount
in interface SystemMessageDAO
recipient
- The recipient nametype
- The message typeread
- Optional flagcom.logicaldoc.core.communication.SystemMessageDAO#getCount(java.lang.String,
int)
public void deleteExpiredMessages(String recipient)
SystemMessageDAO
deleteExpiredMessages
in interface SystemMessageDAO
recipient
- 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)
SystemMessageDAO
deleteExpiredMessages
in interface SystemMessageDAO
type
- The message typeSystemMessageDAO.deleteExpiredMessages(int)
public List<SystemMessage> findByMode(String mode)
SystemMessageDAO
findByMode
in interface SystemMessageDAO
mode
- The message modepublic List<SystemMessage> findByType(int type)
SystemMessageDAO
findByType
in interface SystemMessageDAO
public void initialize(SystemMessage message)
HibernatePersistentObjectDAO
initialize
in interface PersistentObjectDAO<SystemMessage>
initialize
in class HibernatePersistentObjectDAO<SystemMessage>
message
- The entity to be initialisedpublic List<SystemMessage> findMessagesToBeSent(int type, int maxTrial)
SystemMessageDAO
findMessagesToBeSent
in interface SystemMessageDAO
type
- The message typemaxTrial
- The maximum number of sending trialsCopyright © 2008-2014 Logical Objects. All Rights Reserved.