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, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findDraftFor, findHistoricalVersionsAfterVersion, findPreviousVersions, findUnpublishedContentWithUserContributions, getAllCurrentEntities, getByClassId, getById, getContentAuthoredByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getLockedContentBySpace, getObjectType, getOldestPageCreationDate, getPageAndBlogPostsVersionsLastEditedByUser, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionHistorySummary, getVersionsLastEditedByUser
findAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, setCacheFactory, setConfluenceUserDao, updateModificationData
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, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, uniqueResult
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findDraftFor, findHistoricalVersionsAfterVersion, findPreviousVersions, findUnpublishedContentWithUserContributions, getAllCurrentEntities, getById, getContentAuthoredByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getLockedContentBySpace, getObjectType, getOldestPageCreationDate, getPageAndBlogPostsVersionsLastEditedByUser, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionHistorySummary, getVersionsLastEditedByUser
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
space
- Copyright © 2003–2016 Atlassian. All rights reserved.