public class HibernateMailDao extends ContentEntityObjectHibernateDao implements MailDao
HibernateObjectDao.Cacheability
ONE_DAY
cacheFactory, confluenceUserDao
NON_CACHEABLE
Constructor and Description |
---|
HibernateMailDao() |
Modifier and Type | Method and Description |
---|---|
int |
findMailTotal(Space space) |
Mail |
getFirstMailAfter(String spaceKey,
long mailId) |
Mail |
getFirstMailBefore(String spaceKey,
long mailId) |
List |
getMail(Space space,
boolean currentOnly) |
Mail |
getMailById(long id)
Retrieve a single mail by its persistent object id.
|
Mail |
getMailByMessageId(String messageId)
Retrieve a single mail by its message-id.
|
List |
getMailsByMessageId(String messageId)
Retrieve all mails with a particular message id.
|
Mail |
getMostRecentMail(String spaceKey) |
Class |
getPersistentClass() |
List |
getSpaceMail(int firstResult,
int maxResults,
String spaceKey) |
Iterator |
getSpaceMailIterator(String spaceKey) |
Iterator |
getSpaceMailWithAttachmentsIterator(String spaceKey) |
void |
removeAllMail(Space space)
bulk mail removal using direct jdbc (too slow using hibernate, as it loads all mails into session prior to deletion which is bad)
|
countContentBySpaceIdAndStatus, findAllDraftsFor, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findDraftFor, findHistoricalVersionsAfterVersion, findPreviousVersions, findUnpublishedContentWithUserContributions, getAllCurrentEntities, getByClassId, getById, getContentAuthoredByUser, getContributionStatusByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getObjectType, getOldestPageCreationDate, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionEditContributors, getVersionHistorySummary, getVersionHistorySummary, getVersionsLastEditedByUser, getVersionsLastEditedByUserNew
findAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, setCacheFactory, setConfluenceUserDao, updateModificationData
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findByClassIds, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, getHibernateTemplate, getSession, getSessionFactory, index, refresh, reIndex, remove, replicate, save, saveRaw, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, uniqueResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countContentBySpaceIdAndStatus, findAllDraftsFor, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findDraftFor, findHistoricalVersionsAfterVersion, findPreviousVersions, findUnpublishedContentWithUserContributions, getAllCurrentEntities, getById, getContentAuthoredByUser, getContributionStatusByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getObjectType, getOldestPageCreationDate, getPageAndBlogPostsVersionsLastEditedByUser, getPageAndBlogPostsVersionsLastEditedByUserIncludingDrafts, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionEditContributors, getVersionHistorySummary, getVersionHistorySummary, getVersionsLastEditedByUser, getVersionsLastEditedByUserNew
findLatestVersionsCount, findLatestVersionsIterator, save
findAll, findAllSorted, findAllSorted, findByClassIds, refresh, remove, replicate, save, saveRaw
public Class getPersistentClass()
getPersistentClass
in interface ObjectDao
getPersistentClass
in class ContentEntityObjectHibernateDao
public Mail getMailById(long id)
MailDao
getMailById
in interface MailDao
id
- the id of the mail to retrievepublic Mail getMailByMessageId(String messageId)
MailDao
MailDao.getMailsByMessageId(java.lang.String)
.
Message ids are case sensitive.
getMailByMessageId
in interface MailDao
messageId
- the Message-Id of the mail to retrievepublic List getMailsByMessageId(String messageId)
MailDao
MailDao.getMailByMessageId(java.lang.String)
instead, but this
method is useful if you want to cater for the possibility of (unlikely) accidental
clashes or (more likely) deliberate forgeries.
Message ids are case sensitive
getMailsByMessageId
in interface MailDao
messageId
- The Message-Id of the mail to retrievepublic Mail getMostRecentMail(String spaceKey)
getMostRecentMail
in interface MailDao
public Mail getFirstMailAfter(String spaceKey, long mailId)
getFirstMailAfter
in interface MailDao
public Mail getFirstMailBefore(String spaceKey, long mailId)
getFirstMailBefore
in interface MailDao
public Iterator getSpaceMailIterator(String spaceKey)
getSpaceMailIterator
in interface MailDao
public Iterator getSpaceMailWithAttachmentsIterator(String spaceKey)
getSpaceMailWithAttachmentsIterator
in interface MailDao
public int findMailTotal(Space space)
findMailTotal
in interface MailDao
public List getSpaceMail(int firstResult, int maxResults, String spaceKey)
getSpaceMail
in interface MailDao
public void removeAllMail(Space space)
removeAllMail
in interface MailDao
Copyright © 2003–2017 Atlassian. All rights reserved.