eu.etaxonomy.cdm.database.update
Class UpdaterBase<T extends ISchemaUpdaterStep,U extends IUpdater<U>>
java.lang.Object
eu.etaxonomy.cdm.database.update.UpdaterBase<T,U>
- All Implemented Interfaces:
- IUpdater<U>
- Direct Known Subclasses:
- SchemaUpdaterBase, TermUpdaterBase
public abstract class UpdaterBase<T extends ISchemaUpdaterStep,U extends IUpdater<U>>
- extends Object
- implements IUpdater<U>
- Author:
- a.mueller
|
Method Summary |
int |
countSteps(ICdmDataSource datasource,
IProgressMonitor monitor)
Returns the number of steps to run to update the datasource
to the schema this schema updater is updating to. |
protected abstract String |
getCurrentVersion(ICdmDataSource datasource,
IProgressMonitor monitor)
|
abstract U |
getNextUpdater()
Returns the next CDM term/schema updater |
abstract U |
getPreviousUpdater()
Returns the previous CDM term/schema updater |
String |
getTargetVersion()
|
protected boolean |
handleSingleStep(ICdmDataSource datasource,
IProgressMonitor monitor,
boolean result,
ISchemaUpdaterStep step,
boolean isInnerStep)
|
boolean |
invoke(ICdmDataSource datasource,
IProgressMonitor monitor)
|
boolean |
invoke(String targetVersion,
ICdmDataSource datasource,
IProgressMonitor monitor)
|
protected boolean |
isAfterMyStartVersion(String dataSourceSchemaVersion,
IProgressMonitor monitor)
|
protected boolean |
isAfterMyTargetVersion(String dataSourceSchemaVersion,
IProgressMonitor monitor)
|
protected boolean |
isBeforeMyStartVersion(String dataSourceSchemaVersion,
IProgressMonitor monitor)
|
protected boolean |
isBeforeMyTargetVersion(String dataSourceSchemaVersion,
IProgressMonitor monitor)
|
protected abstract boolean |
updateVersion(ICdmDataSource datasource,
IProgressMonitor monitor)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
list
protected List<T extends ISchemaUpdaterStep> list
startVersion
protected String startVersion
targetVersion
protected String targetVersion
UpdaterBase
public UpdaterBase()
updateVersion
protected abstract boolean updateVersion(ICdmDataSource datasource,
IProgressMonitor monitor)
throws SQLException
- Throws:
SQLException
getCurrentVersion
protected abstract String getCurrentVersion(ICdmDataSource datasource,
IProgressMonitor monitor)
throws SQLException
- Throws:
SQLException
countSteps
public int countSteps(ICdmDataSource datasource,
IProgressMonitor monitor)
- Description copied from interface:
IUpdater
- Returns the number of steps to run to update the datasource
to the schema this schema updater is updating to.
This includes needed steps in previous updaters.
- Specified by:
countSteps in interface IUpdater<U extends IUpdater<U>>
- Returns:
- number of steps
- See Also:
IUpdater.getPreviousUpdater()
invoke
public boolean invoke(ICdmDataSource datasource,
IProgressMonitor monitor)
throws Exception
- Specified by:
invoke in interface IUpdater<U extends IUpdater<U>>
- Throws:
Exception
invoke
public boolean invoke(String targetVersion,
ICdmDataSource datasource,
IProgressMonitor monitor)
throws Exception
- Specified by:
invoke in interface IUpdater<U extends IUpdater<U>>
- Throws:
Exception
handleSingleStep
protected boolean handleSingleStep(ICdmDataSource datasource,
IProgressMonitor monitor,
boolean result,
ISchemaUpdaterStep step,
boolean isInnerStep)
throws Exception
- Throws:
Exception
isAfterMyStartVersion
protected boolean isAfterMyStartVersion(String dataSourceSchemaVersion,
IProgressMonitor monitor)
isBeforeMyStartVersion
protected boolean isBeforeMyStartVersion(String dataSourceSchemaVersion,
IProgressMonitor monitor)
isAfterMyTargetVersion
protected boolean isAfterMyTargetVersion(String dataSourceSchemaVersion,
IProgressMonitor monitor)
isBeforeMyTargetVersion
protected boolean isBeforeMyTargetVersion(String dataSourceSchemaVersion,
IProgressMonitor monitor)
getNextUpdater
public abstract U getNextUpdater()
- Description copied from interface:
IUpdater
- Returns the next CDM term/schema updater
- Specified by:
getNextUpdater in interface IUpdater<U extends IUpdater<U>>
- Returns:
getPreviousUpdater
public abstract U getPreviousUpdater()
- Description copied from interface:
IUpdater
- Returns the previous CDM term/schema updater
- Specified by:
getPreviousUpdater in interface IUpdater<U extends IUpdater<U>>
- Returns:
getTargetVersion
public String getTargetVersion()
- Returns:
Copyright © 2007-2013 EDIT. All Rights Reserved.