er.extensions.migration
Class ERXMigrationDatabase.Migration
java.lang.Object
er.extensions.migration.ERXMigrationDatabase.Migration
- All Implemented Interfaces:
- IERXMigration
- Direct Known Subclasses:
- BugTracker0, BugTracker1, ERAttachment0, ERAttachment1, ERAttachmentMigration, ERCoreBusinessLogic0, ERTaggable0, ERTaggableEntity0
- Enclosing class:
- ERXMigrationDatabase
public abstract static class ERXMigrationDatabase.Migration
- extends java.lang.Object
- implements IERXMigration
A convenience implementation of IERXMigration that passes in an
ERXMigrationDatabase instead of channel + model.
- Author:
- mschrag
Method Summary |
void |
downgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
com.webobjects.eoaccess.EOAdaptorChannel channel,
com.webobjects.eoaccess.EOModel model)
Called when migrating the database from the next version to this version. |
abstract void |
downgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
ERXMigrationDatabase database)
|
com.webobjects.foundation.NSArray<java.lang.String> |
languages()
|
com.webobjects.foundation.NSArray<ERXModelVersion> |
modelDependencies()
Overridden to return null by default |
void |
upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
com.webobjects.eoaccess.EOAdaptorChannel channel,
com.webobjects.eoaccess.EOModel model)
Called when migrating the database from the last version to this version. |
abstract void |
upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
ERXMigrationDatabase database)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALLOWS_NULL
public static final boolean ALLOWS_NULL
- See Also:
- Constant Field Values
NOT_NULL
public static final boolean NOT_NULL
- See Also:
- Constant Field Values
ERXMigrationDatabase.Migration
protected ERXMigrationDatabase.Migration()
ERXMigrationDatabase.Migration
protected ERXMigrationDatabase.Migration(com.webobjects.foundation.NSArray languages)
languages
public com.webobjects.foundation.NSArray<java.lang.String> languages()
downgrade
public void downgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
com.webobjects.eoaccess.EOAdaptorChannel channel,
com.webobjects.eoaccess.EOModel model)
throws java.lang.Throwable
- Description copied from interface:
IERXMigration
- Called when migrating the database from the next version to this version. For instance if this is AuthModel1, it
will be called to migrate from version 1 back to version 0.
If this is the lowest migration you support, downgrade should throw an ERXMigrationFailedException.
- Specified by:
downgrade
in interface IERXMigration
- Parameters:
editingContext
- the editing context you can perform EO operations with.channel
- the channel to perform low level operations withmodel
- the model being downgraded
- Throws:
java.lang.Throwable
- if something fails
downgrade
public abstract void downgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
ERXMigrationDatabase database)
throws java.lang.Throwable
- Parameters:
editingContext
- the editing contextdatabase
- the migration database
- Throws:
java.lang.Throwable
- if anything goes wrong- See Also:
IERXMigration.downgrade
modelDependencies
public com.webobjects.foundation.NSArray<ERXModelVersion> modelDependencies()
- Overridden to return null by default
- Specified by:
modelDependencies
in interface IERXMigration
- Returns:
- an array of model versions that this migration depends on
upgrade
public void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
com.webobjects.eoaccess.EOAdaptorChannel channel,
com.webobjects.eoaccess.EOModel model)
throws java.lang.Throwable
- Description copied from interface:
IERXMigration
- Called when migrating the database from the last version to this version. For instance if this is AuthModel1, it
will be called to migrate from version 0 to version 1.
- Specified by:
upgrade
in interface IERXMigration
- Parameters:
editingContext
- the editing context you can perform EO operations with.channel
- the channel to perform low level operations withmodel
- the model being upgraded
- Throws:
java.lang.Throwable
- if something fails
upgrade
public abstract void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
ERXMigrationDatabase database)
throws java.lang.Throwable
- Parameters:
editingContext
- the editing contextdatabase
- the migration database
- Throws:
java.lang.Throwable
- if anything goes wrong- See Also:
IERXMigration.upgrade
Copyright © 2002 – 2007 Project Wonder.