Class BusinessDataJsonFormatMigrator<T>
- java.lang.Object
-
- ch.ivyteam.ivy.business.data.store.migration.BusinessDataJsonFormatMigrator<T>
-
- Type Parameters:
T
-
public class BusinessDataJsonFormatMigrator<T> extends Object
Migrates the legacy Business Data JSON values to the latest version. The values are migrated in the database and afterwards the search index is recreated.This class must be called from a process in an
IIvyProject
that contains the root Business Data class.
For an example see the WorkflowDemos: BusinessData/MigrateData/migrate.ivpExample:
import ch.ivyteam.ivy.business.data.store.migration.BusinessDataJsonFormatMigrator; boolean isDryRun = true; BusinessDataJsonFormatMigrator.migrate(workflow.businessdata.Dossier.class, isDryRun);
The migrator simply deserializes the JSON and serialize the JSON afterwards. e.g.
- when adding a new field to your data model, this will be empty.
- when removing a field from your data model, the field will be removed from the existing business data objects.
- when renaming, existing field will be deleted and and a new empty field will be created.
- Since:
- 6.7.0
- API:
- This is a public API.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
migrate(Class<?> type, boolean isDryRun)
-
-
-
Method Detail
-
migrate
public static void migrate(Class<?> type, boolean isDryRun)
- Parameters:
type
- the root Business Data class that has previously been stored with theBusinessDataRepository
isDryRun
- simulates the migration iftrue
. Otherwise it applies the real persistent migration.- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
-