com.xpn.xwiki.store.hibernate
Class HibernateAttachmentVersioningStore

java.lang.Object
  extended by com.xpn.xwiki.store.XWikiHibernateBaseStore
      extended by com.xpn.xwiki.store.hibernate.HibernateAttachmentVersioningStore
All Implemented Interfaces:
AttachmentVersioningStore, org.xwiki.component.phase.Initializable

@Component
@Named(value="hibernate")
@Singleton
public class HibernateAttachmentVersioningStore
extends XWikiHibernateBaseStore
implements AttachmentVersioningStore

Realization of AttachmentVersioningStore for Hibernate-based storage.

Since:
1.4M2
Version:
$Id: 8eb30464eabd50e2b70b9ef81ed1bce5635df325 $

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
loggerManager
 
Constructor Summary
HibernateAttachmentVersioningStore()
          Empty constructor needed for component manager.
HibernateAttachmentVersioningStore(XWikiContext context)
          Deprecated. 1.6M1. Use ComponentManager.lookup(AttachmentVersioningStore.class) instead.
 
Method Summary
 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, getDatabaseProductName, getDatabaseProductName, getExecution, getMapping, getNbConnections, getPath, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaFromWikiName, getSchemaUpdateScript, getSession, getSessionFactory, getTransaction, initialize, isInSchemaMode, isVirtual, makeMapping, setDatabase, setNbConnections, setPath, setSession, setSessionFactory, setTransaction, shutdownHibernate, updateSchema, updateSchema, updateSchema, updateSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface AttachmentVersioningStore
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 interface AttachmentVersioningStore
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 interface AttachmentVersioningStore
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.


Copyright © 2004–2014 XWiki. All rights reserved.