Class TransactionalHibernateAttachmentDao

All Implemented Interfaces:
AttachmentDaoInternal, AttachmentDao, FlushableCachingDao, org.springframework.beans.factory.InitializingBean

public class TransactionalHibernateAttachmentDao extends AbstractHibernateAttachmentDao
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:
  • Constructor Details

    • TransactionalHibernateAttachmentDao

      public TransactionalHibernateAttachmentDao()
  • Method Details

    • setDataDao

      public void setDataDao(TransactionalAttachmentDataDao dao)
      We override the parent setter here so we are certain we're getting a transactional AttachmentDataDao to work with
      Parameters:
      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
    • removeAllVersionsFromServer

      public List<Attachment> removeAllVersionsFromServer(Attachment attachment)
      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 class AbstractHibernateAttachmentDao