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.IntraHibernateAttachmentMigrator
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability
Nested 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
dataDao
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionremoveAllVersionsFromServer
(Attachment attachment) Removes all versions of an attachmentvoid
removeAttachmentFromServer
(Attachment attachment) Removes attachment (and all of its versions)protected void
removeAttachmentVersionFromServer
(Attachment attachmentVersionToBeRemoved, Attachment previousAttachmentVersion) void
We 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, 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, setEventPublisher, updateAttachment
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
applyChildVersioningPolicy, findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, remove, save
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
updateModificationData
Methods 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, uniqueResult
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.pages.persistence.dao.AttachmentDao
findAll
Methods 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:AttachmentDao
Removes attachment (and all of its versions)- Parameters:
attachment
- the Attachment to be removed
-
removeAllVersionsFromServer
Description copied from interface:AttachmentDaoInternal
Removes 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:
removeAttachmentVersionFromServer
in classAbstractHibernateAttachmentDao
-