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

Migrates from 7000013 to 7000014
Inheritance: IDataMigration
ファイルを表示 Open project: sillsdev/FieldWorks

Public Methods

Method Description
PerformMigration ( IDomainObjectDTORepository domainObjectDtoRepository ) : void

Changes the use of CmAgentEvaluation, so that instead of one evaluation per agent/target pair owned by Agent.Evauations and referring to the target, there are only two CmAgentEvaluations owned by each CmAgent in their Approves and Disapproves properties, and they are referred to by the new WfiAnalysis.Evaluations Reference Collection. Specifically, for each CmAgent, - Create two CmAgentEvaluations, one owned in Approves and one in Disapproves. - For each item in Evaluations, if Accepted, add the appropriate Approves evaluation to the target of the evaluation, otherwise, add the appropriate Disapproves (if there is a target). - Delete the Evaluations. As a side effect, since all existing CmAgentEvaluations are deleted, obsolete properties are removed.

Private Methods

Method Description
MakeEvaluation ( string ownerGuid, IDomainObjectDTORepository domainObjectDtoRepository, System.Xml.Linq.XElement agentElement, string owningAttr ) : DomainObjectDTO

Method Details

PerformMigration() public method

Changes the use of CmAgentEvaluation, so that instead of one evaluation per agent/target pair owned by Agent.Evauations and referring to the target, there are only two CmAgentEvaluations owned by each CmAgent in their Approves and Disapproves properties, and they are referred to by the new WfiAnalysis.Evaluations Reference Collection. Specifically, for each CmAgent, - Create two CmAgentEvaluations, one owned in Approves and one in Disapproves. - For each item in Evaluations, if Accepted, add the appropriate Approves evaluation to the target of the evaluation, otherwise, add the appropriate Disapproves (if there is a target). - Delete the Evaluations. As a side effect, since all existing CmAgentEvaluations are deleted, obsolete properties are removed.
public PerformMigration ( IDomainObjectDTORepository domainObjectDtoRepository ) : void
domainObjectDtoRepository IDomainObjectDTORepository Repository of all CmObject DTOs available for /// one migration step.
return void