MigrateEntry { public static void migrateAll(boolean debug) throws Exception { Result<Record1<UUID>> result = domainAccess.getContext().select(ENTRY.ID).from(ENTRY).fetch(); if (result == null) throw new IllegalArgumentException("Empty DB"); System.out.println("Migrating "+result.size()+" entries "); int count = 0; for (Record record: result){ UUID entryId = (UUID)record.getValue("id"); try { String serialized = migrateEntry(domainAccess, entryId, debug); if (debug){ if (serialized.contains("DEFAULT") || serialized.contains("1900-01-01")){ System.out.println("!!!=== DEFAULT FOUND IN " + entryId); System.out.println(serialized); } } ++count; } catch (Exception e){ System.out.println("\nCould not migrate:"+entryId+" ,reason:"+e); } System.out.print("."); } System.out.println("Migrated " + count + " entries"); } MigrateEntry(Properties props);  MigrateEntry(I_DomainAccess access); static String dumpSerialized(Composition composition); static UUID saveUncommittedEntry(Composition composition); static String migrateComposition(Properties properties, UUID compositionId, boolean debug); static String migrateComposition(I_DomainAccess access, UUID compositionId, boolean debug); static String migrateEntry(Properties properties, UUID entryId, boolean debug); static String migrateEntry(I_DomainAccess access, UUID entryId, boolean debug); static Composition migrate(String jsonEntry, String templateId); static void migrateAll(boolean debug); static void main(String[] args);  }
@Test public void testMigrateEntries() throws Exception { MigrateEntry migrateEntry = new MigrateEntry(testDomainAccess); migrateEntry.migrateAll(false); }