Interface FactorValueMigratorService

All Known Implementing Classes:
FactorValueMigratorServiceImpl

public interface FactorValueMigratorService
  • Method Details

    • performMigration

      Perform the given migration.
      Parameters:
      migration - a migration to perform
      noop - if true, do not save the resulting statement
      Returns:
      the created or updated statement
    • performMultipleMigrations

      Perform multiple migrations in a single transaction.
      Parameters:
      migrations - a list of migrations to perform
      Returns:
      a list of created or updated statements
      Throws:
      FactorValueMigratorService.MigrationFailedException - if any of the migrations fail, the first failed migration is stored in the exception wrapper
    • performMigrationOfRemainingOldStyleCharacteristics

      List<FactorValueMigratorService.MigrationResult> performMigrationOfRemainingOldStyleCharacteristics(Long fvId, Set<Long> migratedOldStyleCharacteristicIds, boolean noop)
      Migrate all the old-style characteristics of a given factor value to subject-only statements.

      The FV will be marked as troubled.

      Parameters:
      fvId - ID of the factor value to migrate
      migratedOldStyleCharacteristicIds - a set of already migrated old-style characteristic IDs, if null the Characteristic.isMigratedToStatement() flag will be used to determine if a characteristic has already been migrated
      noop - if true, do not save the resulting statements
      Returns:
      list of created or updated statements from the given factor value
    • performMigrationOfRemainingFactorValues

      Map<Long,List<FactorValueMigratorService.MigrationResult>> performMigrationOfRemainingFactorValues(Set<Long> migratedFactorValueIds, boolean migrateNonTrivialCases, boolean noop)
      Migrate all remaining factor values that have not been migrated yet.

      All the FVs with zero or one characteristics will be migrated automatically unless migratedToSubjectOnly is set, in which case all the old-style characteristics will be migrated to subject-only statements.

      Parameters:
      migratedFactorValueIds - IDs of already migrated FVs
      migrateNonTrivialCases - allow migration to subject-only statements for FVs with more than one old-style characteristics; those FVs will be marked as troubled.
      noop - if true, do not save the resulting statements
      Returns:
      created of updated statements organized by factor value ID