-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into modfqmmgr-442
- Loading branch information
Showing
7 changed files
with
99 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/main/java/org/folio/fqm/migration/strategies/V2ResourceTypeConsolidation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package org.folio.fqm.migration.strategies; | ||
|
||
import java.util.Map; | ||
import java.util.UUID; | ||
import java.util.function.BiFunction; | ||
import java.util.function.Function; | ||
import org.folio.fqm.migration.AbstractSimpleMigrationStrategy; | ||
import org.folio.fqm.migration.warnings.EntityTypeWarning; | ||
import org.folio.fqm.migration.warnings.FieldWarning; | ||
|
||
/** | ||
* Version 2 -> 3, decouples simple_mode_of_issuance entity type from composite_instances | ||
* @see https://folio-org.atlassian.net/browse/MODFQMMGR-429 | ||
*/ | ||
public class V2ResourceTypeConsolidation extends AbstractSimpleMigrationStrategy { | ||
|
||
public static final UUID COMPOSITE_INSTANCES = UUID.fromString("6b08439b-4f8e-4468-8046-ea620f5cfb74"); | ||
|
||
@Override | ||
public String getLabel() { | ||
return "V2 -> V3 Exposing resource_type directly in composite_instances (MODFQMMGR-429)"; | ||
} | ||
|
||
@Override | ||
public String getSourceVersion() { | ||
return "2"; | ||
} | ||
|
||
@Override | ||
public String getTargetVersion() { | ||
return "3"; | ||
} | ||
|
||
@Override | ||
public Map<UUID, UUID> getEntityTypeChanges() { | ||
return Map.of(); | ||
} | ||
|
||
@Override | ||
public Map<UUID, Map<String, String>> getFieldChanges() { | ||
return Map.ofEntries( | ||
Map.entry( | ||
COMPOSITE_INSTANCES, | ||
Map.ofEntries( | ||
Map.entry("instance_type.id", "instance.instance_type_id"), | ||
Map.entry("instance_type.name", "instance.instance_type_name") | ||
) | ||
) | ||
); | ||
} | ||
|
||
@Override | ||
public Map<UUID, Function<String, EntityTypeWarning>> getEntityTypeWarnings() { | ||
return Map.of(); | ||
} | ||
|
||
@Override | ||
public Map<UUID, Map<String, BiFunction<String, String, FieldWarning>>> getFieldWarnings() { | ||
return Map.of(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters