C# Class SIL.FieldWorks.FDO.DomainServices.DataMigration.FdoDataMigrationManager

Implementation of IDataMigrationManager
Inheritance: IDataMigrationManager
Exibir arquivo Open project: sillsdev/FieldWorks

Public Methods

Method Description
NeedsRealMigration ( int startingVersionNumber, int endingVersionNumber ) : bool

An optional check for real data migration needs can be performed before calling PerformMigration by calling this method. If it returns true, then real data changes will be required to get from startingVersionNumber to endingVersionNumber.

PerformMigration ( IDomainObjectDTORepository domainObjectDtoRepository, int updateToVersion, IThreadedProgress progressDlg ) : void

Perform the data migration on the DTOs in the given repository. The resulting xml in the DTOs must be compatible with the xml of the given updateToVersion number. The implementation of this interface will process as many migrations, in sequence, as are needed to move from whatever version is in the repository to bring it up to the specified version number in updateToVersion.

An implementation of this interface is free to define its own migration definitions. These definitions need not be compatible with any other implementation of this interface. That is, there is no interface defined for declaring and consuming data migration instructions.

Private Methods

Method Description
FdoDataMigrationManager ( ) : System

Constructor

MigrateTask ( IThreadedProgress progressDlg, object parameters ) : object

Method Details

NeedsRealMigration() public method

An optional check for real data migration needs can be performed before calling PerformMigration by calling this method. If it returns true, then real data changes will be required to get from startingVersionNumber to endingVersionNumber.
/// Thrown on any of the following conditions: /// /// 1. is less than 7000000, /// 2. is greater than the highest /// currently suported migration version number, or /// 3. is greater than /// . ///
public NeedsRealMigration ( int startingVersionNumber, int endingVersionNumber ) : bool
startingVersionNumber int The starting version number of the data.
endingVersionNumber int /// The desired ending number of the migration. /// NB: This should never be higher than the migration manaer can support, /// but it may be lower than highest supported migration number. ///
return bool

PerformMigration() public method

Perform the data migration on the DTOs in the given repository. The resulting xml in the DTOs must be compatible with the xml of the given updateToVersion number. The implementation of this interface will process as many migrations, in sequence, as are needed to move from whatever version is in the repository to bring it up to the specified version number in updateToVersion.
An implementation of this interface is free to define its own migration definitions. These definitions need not be compatible with any other implementation of this interface. That is, there is no interface defined for declaring and consuming data migration instructions.
/// Thrown if the migration cannot be done successfully for the following reasons: /// /// /// is null. /// /// /// Don't know how to upgrade to version: . /// /// /// Version number in /// is newer than . /// /// ///
public PerformMigration ( IDomainObjectDTORepository domainObjectDtoRepository, int updateToVersion, IThreadedProgress progressDlg ) : void
domainObjectDtoRepository IDomainObjectDTORepository Repository of CmObject DTOs.
updateToVersion int /// Model version number the updated repository should have after the migration ///
progressDlg IThreadedProgress The dialog to display migration progress
return void