Package com.xpn.xwiki.store.hibernate
Class HibernateAttachmentVersioningStore
- java.lang.Object
-
- com.xpn.xwiki.internal.store.AbstractXWikiStore
-
- com.xpn.xwiki.store.XWikiHibernateBaseStore
-
- com.xpn.xwiki.store.hibernate.HibernateAttachmentVersioningStore
-
- All Implemented Interfaces:
AttachmentVersioningStore
@Component @Named("hibernate") @Singleton public class HibernateAttachmentVersioningStore extends XWikiHibernateBaseStore implements AttachmentVersioningStore
Realization ofAttachmentVersioningStore
for Hibernate-based storage.- Since:
- 1.4M2
- Version:
- $Id: c5dc5bfeb27b3e37eaf0afe765e99f5b06784053 $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.xpn.xwiki.store.XWikiHibernateBaseStore
XWikiHibernateBaseStore.HibernateCallback<T>
-
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.store.XWikiHibernateBaseStore
hibernateConfiguration, HINT, loggerManager, store
-
-
Constructor Summary
Constructors Constructor Description HibernateAttachmentVersioningStore()
Empty constructor needed for component manager.HibernateAttachmentVersioningStore(XWikiContext context)
Deprecated.1.6M1.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteArchive(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
Permanently delete attachment archive.XWikiAttachmentArchive
loadArchive(XWikiAttachment attachment, XWikiContext context, boolean bTransaction)
Load attachment archive from store.void
saveArchive(XWikiAttachmentArchive archive, XWikiContext context, boolean bTransaction)
Save or update attachment archive.-
Methods inherited from class com.xpn.xwiki.store.XWikiHibernateBaseStore
beginTransaction, beginTransaction, beginTransaction, beginTransaction, checkHibernate, cleanUp, createHibernateSequenceIfRequired, dynamicMappingTableName, endTransaction, endTransaction, escapeSchema, execute, execute, executeRead, executeRead, executeWrite, executeWrite, failSafeExecute, failSafeExecuteRead, failSafeExecuteWrite, getConfiguration, getConnections, getDatabaseMetaData, getDatabaseProductName, getDatabaseProductName, getDialect, getExecution, getHint, getMapping, getMetadata, getNbConnections, getPath, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaUpdateScript, getSession, getSessionFactory, getTransaction, isInSchemaMode, isVirtual, makeMapping, setDatabase, setNbConnections, setPath, setSession, setSessionFactory, setTransaction, shutdownHibernate, updateSchema, updateSchema, updateSchema, updateSchema
-
Methods inherited from class com.xpn.xwiki.internal.store.AbstractXWikiStore
getExecutionXContext, restoreExecutionXContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.xpn.xwiki.store.AttachmentVersioningStore
getHint
-
-
-
-
Constructor Detail
-
HibernateAttachmentVersioningStore
@Deprecated public HibernateAttachmentVersioningStore(XWikiContext context)
Deprecated.1.6M1. Use ComponentManager.lookup(AttachmentVersioningStore.class) instead.- Parameters:
context
- the current context.
-
HibernateAttachmentVersioningStore
public HibernateAttachmentVersioningStore()
Empty constructor needed for component manager.
-
-
Method Detail
-
loadArchive
public XWikiAttachmentArchive loadArchive(XWikiAttachment attachment, XWikiContext context, boolean bTransaction) throws XWikiException
Description copied from interface:AttachmentVersioningStore
Load attachment archive from store.- Specified by:
loadArchive
in interfaceAttachmentVersioningStore
- Parameters:
attachment
- The attachment of archive.context
- The current context.bTransaction
- Should use old transaction (false) or create new (true).- Returns:
- attachment archive. not null. return empty archive if it is not exist in store.
- Throws:
XWikiException
- If an error occurs.
-
saveArchive
public void saveArchive(XWikiAttachmentArchive archive, XWikiContext context, boolean bTransaction) throws XWikiException
Description copied from interface:AttachmentVersioningStore
Save or update attachment archive.- Specified by:
saveArchive
in interfaceAttachmentVersioningStore
- Parameters:
archive
- The attachment archive to save.context
- The current context.bTransaction
- Should use old transaction (false) or create new (true).- Throws:
XWikiException
- If an error occurs.
-
deleteArchive
public void deleteArchive(XWikiAttachment attachment, XWikiContext context, boolean bTransaction) throws XWikiException
Description copied from interface:AttachmentVersioningStore
Permanently delete attachment archive.- Specified by:
deleteArchive
in interfaceAttachmentVersioningStore
- Parameters:
attachment
- The attachment to delete.context
- The current context.bTransaction
- Should use old transaction (false) or create new (true).- Throws:
XWikiException
- If an error occurs.
-
-