@Test public void read_read(){ MigrationManager<ExampleDataA> manager = new MigrationManager<>(ExampleDataA.class, ObjectMapperBuilder.build(), (root1, oldDataStorageMetadataDictionary) -> { }); String data= ObjectMapperBuilder.build().writeValueAsString(new ExampleDataA()); ExampleDataA result = manager.read(data, createDataStorageMetadataDictionary()); Assertions.assertNotNull(result); }
public R read(JsonNode data, DataStorageMetadataDictionary dataStorageMetadataDictionary) { return read(objectMapper.writeTree(data),dataStorageMetadataDictionary); }
MigrationManager { public R read(JsonNode data, DataStorageMetadataDictionary dataStorageMetadataDictionary) { return read(objectMapper.writeTree(data),dataStorageMetadataDictionary); } }
MigrationManager { public R read(JsonNode data, DataStorageMetadataDictionary dataStorageMetadataDictionary) { return read(objectMapper.writeTree(data),dataStorageMetadataDictionary); } MigrationManager(Class<R> rootClass, SimpleObjectMapper objectMapper, AttributeFiller<R> attributeFiller); }
MigrationManager { public R read(JsonNode data, DataStorageMetadataDictionary dataStorageMetadataDictionary) { return read(objectMapper.writeTree(data),dataStorageMetadataDictionary); } MigrationManager(Class<R> rootClass, SimpleObjectMapper objectMapper, AttributeFiller<R> attributeFiller); void renameAttribute(Class<F> dataClass, String previousAttributeName, Function<F, Attribute<?,?>> attributeNameProvider); void renameClass(String previousDataClassNameFullQualified, Class<? extends FactoryBase<?,?>> newDataClass); void restoreAttribute(String singletonPreviousDataClass, String previousAttributeName, Class<V> valueClass, BiConsumer<R,V> setter); void restoreAttribute(Class<V> clazz, AttributePathTarget<V> path, BiConsumer<R,V> setter); void restoreListAttribute(Class<V> clazz, AttributePathTarget<List<V>> path, BiConsumer<R,List<V>> setter); R migrate(JsonNode rootNode, DataStorageMetadataDictionary dataStorageMetadataDictionary); String write(R root); String writeStorageMetadata(StoredDataMetadata metadata); R read(JsonNode data, DataStorageMetadataDictionary dataStorageMetadataDictionary); R read(String data, DataStorageMetadataDictionary dataStorageMetadataDictionary); StoredDataMetadata readStoredFactoryMetadata(String data); ScheduledUpdateMetadata readScheduledFactoryMetadata(String data); String writeScheduledUpdateMetadata(ScheduledUpdateMetadata metadata); String writeRawFactoryDataAndMetadata(R root, StoredDataMetadata metadata); RawFactoryDataAndMetadata readRawFactoryDataAndMetadata(String data); }
MigrationManager { public R read(JsonNode data, DataStorageMetadataDictionary dataStorageMetadataDictionary) { return read(objectMapper.writeTree(data),dataStorageMetadataDictionary); } MigrationManager(Class<R> rootClass, SimpleObjectMapper objectMapper, AttributeFiller<R> attributeFiller); void renameAttribute(Class<F> dataClass, String previousAttributeName, Function<F, Attribute<?,?>> attributeNameProvider); void renameClass(String previousDataClassNameFullQualified, Class<? extends FactoryBase<?,?>> newDataClass); void restoreAttribute(String singletonPreviousDataClass, String previousAttributeName, Class<V> valueClass, BiConsumer<R,V> setter); void restoreAttribute(Class<V> clazz, AttributePathTarget<V> path, BiConsumer<R,V> setter); void restoreListAttribute(Class<V> clazz, AttributePathTarget<List<V>> path, BiConsumer<R,List<V>> setter); R migrate(JsonNode rootNode, DataStorageMetadataDictionary dataStorageMetadataDictionary); String write(R root); String writeStorageMetadata(StoredDataMetadata metadata); R read(JsonNode data, DataStorageMetadataDictionary dataStorageMetadataDictionary); R read(String data, DataStorageMetadataDictionary dataStorageMetadataDictionary); StoredDataMetadata readStoredFactoryMetadata(String data); ScheduledUpdateMetadata readScheduledFactoryMetadata(String data); String writeScheduledUpdateMetadata(ScheduledUpdateMetadata metadata); String writeRawFactoryDataAndMetadata(R root, StoredDataMetadata metadata); RawFactoryDataAndMetadata readRawFactoryDataAndMetadata(String data);  }