com.xpn.xwiki.store.migration.hibernate
Class HibernateDataMigrationManager
java.lang.Object
com.xpn.xwiki.store.migration.AbstractDataMigrationManager
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager
- All Implemented Interfaces:
- DataMigrationManager, org.xwiki.component.phase.Initializable
@Component
@Named(value="hibernate")
@Singleton
public class HibernateDataMigrationManager
- extends AbstractDataMigrationManager
Migration manager for hibernate store.
- Since:
- 3.4M1
- Version:
- $Id: 39e3109cd9bb4c9e2de0ff547239bae16bdf61ae $
Methods inherited from class com.xpn.xwiki.store.migration.AbstractDataMigrationManager |
checkDatabase, getDataMigrationStatus, getDBVersion, getDBVersionFromConfig, getForcedMigrations, getLatestVersion, getMainXWiki, getNeededMigrations, getVirtualWikisDatabaseNames, getXWikiConfig, getXWikiContext, initialize, initNewDB, isVirtualMode, setDBVersion, startMigrations |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateDataMigrationManager
public HibernateDataMigrationManager()
getStore
public XWikiHibernateBaseStore getStore()
throws DataMigrationException
- Returns:
- store system for execute store-specific actions.
- Throws:
DataMigrationException
- if the store could not be reached
getDBVersionFromDatabase
public XWikiDBVersion getDBVersionFromDatabase()
throws DataMigrationException
- Description copied from class:
AbstractDataMigrationManager
- Read data version from database.
- Overrides:
getDBVersionFromDatabase
in class AbstractDataMigrationManager
- Returns:
- data version or null if this is a new database
- Throws:
DataMigrationException
- in case of an unexpected error
initializeEmptyDB
protected void initializeEmptyDB()
throws DataMigrationException
- Specified by:
initializeEmptyDB
in class AbstractDataMigrationManager
- Throws:
DataMigrationException
- if any error
setDBVersionToDatabase
protected void setDBVersionToDatabase(XWikiDBVersion version)
throws DataMigrationException
- Specified by:
setDBVersionToDatabase
in class AbstractDataMigrationManager
- Parameters:
version
- to set
- Throws:
DataMigrationException
- if any error
updateSchema
protected void updateSchema(Collection<AbstractDataMigrationManager.XWikiMigration> migrations)
throws DataMigrationException
- Description copied from class:
AbstractDataMigrationManager
- Update database schema to the latest structure.
- Specified by:
updateSchema
in class AbstractDataMigrationManager
- Parameters:
migrations
- the migration that will be executed (since 4.0M1)
- Throws:
DataMigrationException
- if any error
startMigrations
protected void startMigrations()
throws DataMigrationException
- Description copied from class:
AbstractDataMigrationManager
- Start the migration process.
- Overrides:
startMigrations
in class AbstractDataMigrationManager
- Throws:
DataMigrationException
- in case of any error
getAllMigrations
protected List<? extends DataMigration> getAllMigrations()
throws DataMigrationException
- Specified by:
getAllMigrations
in class AbstractDataMigrationManager
- Returns:
- List of all
DataMigration
for this manager
- Throws:
DataMigrationException
- if any error
Copyright © 2004-2013 XWiki. All Rights Reserved.