Class DataMigrationRepository
- java.lang.Object
-
- fr.gouv.vitam.metadata.core.migration.DataMigrationRepository
-
public class DataMigrationRepository extends java.lang.Object
Repository for mongo data migration
-
-
Constructor Summary
Constructors Constructor Description DataMigrationRepository()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bulkReplaceUnits(java.util.List<Unit> updatedUnits)
Replaces all units in unordered bulk modevoid
bulkUpgradeObjectGroups(java.util.List<java.lang.String> objectGroupIds)
Replaces all GOT in unordered bulk modejava.util.Map<java.lang.String,Unit>
getUnitGraphByIds(java.util.Collection<java.lang.String> unitIds)
Returns units graph by IdsCloseableIterator<java.util.List<java.lang.String>>
selectObjectGroupBulk()
Returns all object group ids to migrate by chunks of (at most) BULK_SIZE.CloseableIterator<java.util.List<Unit>>
selectUnitBulkInTopDownHierarchyLevel()
Returns all unit ids to migrate sorted by top-down hierarchy level, by chunks of (at most) BULK_SIZE.
-
-
-
Method Detail
-
selectUnitBulkInTopDownHierarchyLevel
public CloseableIterator<java.util.List<Unit>> selectUnitBulkInTopDownHierarchyLevel()
Returns all unit ids to migrate sorted by top-down hierarchy level, by chunks of (at most) BULK_SIZE.
-
getUnitGraphByIds
public java.util.Map<java.lang.String,Unit> getUnitGraphByIds(java.util.Collection<java.lang.String> unitIds)
Returns units graph by Ids
-
bulkReplaceUnits
public void bulkReplaceUnits(java.util.List<Unit> updatedUnits)
Replaces all units in unordered bulk mode
-
selectObjectGroupBulk
public CloseableIterator<java.util.List<java.lang.String>> selectObjectGroupBulk()
Returns all object group ids to migrate by chunks of (at most) BULK_SIZE.
-
bulkUpgradeObjectGroups
public void bulkUpgradeObjectGroups(java.util.List<java.lang.String> objectGroupIds)
Replaces all GOT in unordered bulk mode
-
-