com.atlassian.confluence.pages.persistence.dao.hibernate
Class NonTransactionalHibernateAttachmentDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<Attachment>
                  extended by com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao
                      extended by com.atlassian.confluence.pages.persistence.dao.hibernate.NonTransactionalHibernateAttachmentDao
All Implemented Interfaces:
ObjectDao, VersionedObjectDao, AttachmentDao, FlushableCachingDao, org.springframework.beans.factory.InitializingBean

public class NonTransactionalHibernateAttachmentDao
extends AbstractHibernateAttachmentDao

Non-transactional version of the AbstractHibernateAttachmentDao, which removes all attachment data from the data store after removing the attachments from the database.

See Also:
AbstractHibernateAttachmentDao

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 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 com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
cacheFactory, confluenceUserDao
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
NonTransactionalHibernateAttachmentDao()
           
 
Method Summary
 void removeAttachmentFromServer(Attachment attachment)
          Removes attachment (and all of its versions)
protected  void removeAttachmentVersionFromServer(Attachment attachmentVersionToBeRemoved, Attachment previousAttachmentVersion)
           
 void setDataDao(NonTransactionalAttachmentDataDao dao)
           
 
Methods inherited from class com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao
afterMigrationFrom, countLatestVersionsOfAttachments, findAllVersions, findAllVersions, findLatestVersionIds, findLatestVersionIds, findLatestVersionIdsIterator, findLatestVersionIdsIterator, flush, getAttachment, getAttachmentData, getBackingStorageType, getById, getByIds, getCopier, getDataDao, getInstance, getLastAddedVersionsOf, getLatestAttachment, getLatestVersionsOfAttachments, getLatestVersionsOfAttachments, getMigrator, getPersistentClass, isAttachmentPresent, moveAttachment, overwriteMetaData, prepareForMigrationTo, removeAllAttachmentVersions, removeAttachment, removeAttachmentVersionFromServer, removeMetaData, replaceAttachmentData, saveNewAttachment, saveNewAttachmentVersion
 
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findNamedQueryStringParams, save, setCacheFactory, setConfluenceUserDao, updateModificationData
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, uniqueResult
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
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, findLatestVersionsIterator
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw
 

Constructor Detail

NonTransactionalHibernateAttachmentDao

public NonTransactionalHibernateAttachmentDao()
Method Detail

setDataDao

public void setDataDao(NonTransactionalAttachmentDataDao dao)

removeAttachmentFromServer

public void removeAttachmentFromServer(Attachment attachment)
Description copied from interface: AttachmentDao
Removes attachment (and all of its versions)

Parameters:
attachment - the Attachment to be removed

removeAttachmentVersionFromServer

protected void removeAttachmentVersionFromServer(Attachment attachmentVersionToBeRemoved,
                                                 Attachment previousAttachmentVersion)
Specified by:
removeAttachmentVersionFromServer in class AbstractHibernateAttachmentDao


Copyright © 2003-2014 Atlassian. All Rights Reserved.