Package com.avoka.fc.core.dao
Class EmailQueueDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.EmailQueueDao
-
public class EmailQueueDao extends AbstractDao
Provides a DAO for the EmailQueue entity.- See Also:
EmailQueue
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description EmailQueueDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<EmailQueue>
getEmailQueueList(Long clientId, String keyword, String emailStatus, String portalId, Date startDate, Date endDate, int pageSize)
Return a list of email queue items matching the specified search criteriaList<EmailQueue>
getEmailQueueList(String keyword, String emailStatus, String portalId, Date startDate, Date endDate, int pageSize)
Return a list of email queue items matching the specified search criteriaList<EmailQueue>
getEmailsToSend()
Return the list of email queue items that need to be sent, sorted descending by priorityEmailQueue
getObjectForPK(Object object)
Return the email queue item with the specified OIDvoid
markReceiptEmailsAsReady(Submission submission)
Mark all user receipt emails related to this submission as ready (only if they are currently not ready)int
purgeEmailQueue(int maxAgeDays, int fetchLimit, long maxTimeMs)
Purge email queue.void
resetEmailStatus(EmailQueue emailQueueItem)
Reset an email queue item to status ready.-
Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
-
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
-
-
-
Method Detail
-
getObjectForPK
public EmailQueue getObjectForPK(Object object)
Return the email queue item with the specified OID- Parameters:
object
- the OID- Returns:
- the matching email queue item, or null if not found
-
getEmailQueueList
public List<EmailQueue> getEmailQueueList(String keyword, String emailStatus, String portalId, Date startDate, Date endDate, int pageSize)
Return a list of email queue items matching the specified search criteria- Parameters:
keyword
- a search keywordemailStatus
- the status (optional)portalId
- the OID of the portal associated with the email queue item (optional)startDate
- the lower bound on the creation date (optional)endDate
- the upper bound on the creation date (optional)pageSize
- the page size to use in the query- Returns:
- the list of matching email queue items
-
getEmailQueueList
public List<EmailQueue> getEmailQueueList(Long clientId, String keyword, String emailStatus, String portalId, Date startDate, Date endDate, int pageSize)
Return a list of email queue items matching the specified search criteria- Parameters:
clientId
- client id (optional)keyword
- a search keywordemailStatus
- the status (optional)portalId
- the OID of the portal associated with the email queue item (optional)startDate
- the lower bound on the creation date (optional)endDate
- the upper bound on the creation date (optional)pageSize
- the page size to use in the query- Returns:
- the list of matching email queue items
- Since:
- 19.11.3
-
getEmailsToSend
public List<EmailQueue> getEmailsToSend()
Return the list of email queue items that need to be sent, sorted descending by priority- Returns:
- the list of email queue items
-
resetEmailStatus
public void resetEmailStatus(EmailQueue emailQueueItem)
Reset an email queue item to status ready. Also set the number of delivery attempts to 0 so that automatic delivery can recommence.- Parameters:
emailQueueItem
- the non-null email queue item
-
purgeEmailQueue
public int purgeEmailQueue(int maxAgeDays, int fetchLimit, long maxTimeMs)
Purge email queue.- Parameters:
maxAgeDays
- the max email queue age daysfetchLimit
- the maximum number of records to delete (only used if > 0)maxTimeMs
- the maximum time that can be used to purge records- Returns:
- the number of records that were deleted
-
markReceiptEmailsAsReady
public void markReceiptEmailsAsReady(Submission submission)
Mark all user receipt emails related to this submission as ready (only if they are currently not ready)- Parameters:
submission
- the submission (required)
-
-