Class TransactionalHibernateAttachmentDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<T>
com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao<T>
com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<Attachment>
com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao
com.atlassian.confluence.pages.persistence.dao.hibernate.TransactionalHibernateAttachmentDao
- All Implemented Interfaces:
AttachmentDaoInternal,AttachmentDao,FlushableCachingDao,org.springframework.beans.factory.InitializingBean
Transactional version of the AbstractHibernateAttachmentDao, which removes the Attachment data
as the Attachment itself is being removed, since it can be rolled back by the transaction
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao
AbstractHibernateAttachmentDao.IntraHibernateAttachmentCopier, AbstractHibernateAttachmentDao.IntraHibernateAttachmentMigratorNested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.CacheabilityNested classes/interfaces inherited from interface com.atlassian.confluence.pages.persistence.dao.AttachmentDao
AttachmentDao.AttachmentCopier, AttachmentDao.AttachmentMigrator -
Field Summary
Fields inherited from class com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao
dataDaoFields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionremoveAllVersionsFromServer(Attachment attachment) Removes all versions of an attachmentvoidremoveAttachmentFromServer(Attachment attachment) Removes attachment (and all of its versions)protected voidremoveAttachmentVersionFromServer(Attachment attachmentVersionToBeRemoved, Attachment previousAttachmentVersion) voidWe override the parent setter here so we are certain we're getting a transactional AttachmentDataDao to work withMethods inherited from class com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao
afterMigrationFrom, countLatestVersionsOfAttachments, countLatestVersionsOfAttachmentsBySpaceAndStatuses, countLatestVersionsOfAttachmentsByStatuses, countLatestVersionsOfAttachmentsOnPageSince, countLatestVersionsOfAttachmentsWithAnyStatus, findAllVersions, findAllVersions, findLatestVersionIds, findLatestVersionIds, findLatestVersionIdsIterator, findLatestVersionIdsIterator, flush, getAttachment, getAttachmentData, getAttachmentData, getAttachmentStatistics, getBackingStorageType, getById, getByIds, getCopier, getDataDao, getInstance, getLastAddedVersionsOf, getLatestAttachment, getLatestVersionsOfAttachments, getLatestVersionsOfAttachments, getLatestVersionsOfAttachmentsForMultipleCeos, getLatestVersionsOfAttachmentsWithAnyStatus, getLatestVersionsOfAttachmentsWithAnyStatusForContainers, getMigrator, getPersistentClass, getRemappedAttachmentIds, isAttachmentPresent, moveAttachment, overwriteMetaData, prepareForMigrationTo, publishEvent, removeAllAttachmentVersions, removeAttachment, removeAttachmentVersionFromServer, removeMetaData, replaceAttachmentData, saveNewAttachment, saveNewAttachmentVersion, scanFilteredAttachments, scanFilteredAttachments, setEventPublisher, updateAttachmentMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
applyChildVersioningPolicy, findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, remove, saveMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
findNamedQueryStringParams, getContentStatusStringList, getStatusNames, scanFilteredContents, scanFilteredContents, updateModificationDataMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSessionFactory, reIndex, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResultMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.pages.persistence.dao.AttachmentDao
findAllMethods inherited from interface com.atlassian.confluence.internal.pages.persistence.AttachmentDaoInternal
findLatestVersionsIterator
-
Constructor Details
-
TransactionalHibernateAttachmentDao
public TransactionalHibernateAttachmentDao()
-
-
Method Details
-
setDataDao
We override the parent setter here so we are certain we're getting a transactional AttachmentDataDao to work with- Parameters:
dao-
-
removeAttachmentFromServer
Description copied from interface:AttachmentDaoRemoves attachment (and all of its versions)- Parameters:
attachment- the Attachment to be removed
-
removeAllVersionsFromServer
Description copied from interface:AttachmentDaoInternalRemoves all versions of an attachment- Parameters:
attachment- the Attachment to be removed- Returns:
- all versions that have been removed
-
removeAttachmentVersionFromServer
protected void removeAttachmentVersionFromServer(Attachment attachmentVersionToBeRemoved, Attachment previousAttachmentVersion) - Specified by:
removeAttachmentVersionFromServerin classAbstractHibernateAttachmentDao
-