@Test public void save_and_load_version_comment() { final String comment = "Comment metadata"; final String docId = randomId(); transactionTemplate.execute(status -> { EntityUpdateBatch<String, String, JEntityVersion<String>> update = entityStore.updateBatch(docId); ObjectVersion<String> version = ObjectVersion.<String>builder() .meta(comment) .build(); update.addVersion(docId, ObjectVersionGraph.init(version).getTip()); update.execute(); return null; }); ObjectVersionGraph<String> graph = entityStore.getFullGraph(docId); assertThat(graph.getTip().getMeta()).isEqualTo(comment); }
@Override public EntityUpdateBatch<Id, M, V> updateBatch(Id id) { return updateBatch(singleton(id)); }
EntityVersionStoreJdbc extends AbstractVersionStoreJdbc<Id, M, V, EntityUpdateBatch<Id, M, V>, EntityStoreOptions<Id, M, V>> { @Override public EntityUpdateBatch<Id, M, V> updateBatch(Id id) { return updateBatch(singleton(id)); } }
EntityVersionStoreJdbc extends AbstractVersionStoreJdbc<Id, M, V, EntityUpdateBatch<Id, M, V>, EntityStoreOptions<Id, M, V>> { @Override public EntityUpdateBatch<Id, M, V> updateBatch(Id id) { return updateBatch(singleton(id)); } @SuppressWarnings("unused") protected  EntityVersionStoreJdbc();  EntityVersionStoreJdbc(EntityStoreOptions<Id, M, V> options); }
EntityVersionStoreJdbc extends AbstractVersionStoreJdbc<Id, M, V, EntityUpdateBatch<Id, M, V>, EntityStoreOptions<Id, M, V>> { @Override public EntityUpdateBatch<Id, M, V> updateBatch(Id id) { return updateBatch(singleton(id)); } @SuppressWarnings("unused") protected  EntityVersionStoreJdbc();  EntityVersionStoreJdbc(EntityStoreOptions<Id, M, V> options); @Override EntityUpdateBatch<Id, M, V> updateBatch(Id id); @Override EntityUpdateBatch<Id, M, V> updateBatch(Collection<Id> docIds); }
EntityVersionStoreJdbc extends AbstractVersionStoreJdbc<Id, M, V, EntityUpdateBatch<Id, M, V>, EntityStoreOptions<Id, M, V>> { @Override public EntityUpdateBatch<Id, M, V> updateBatch(Id id) { return updateBatch(singleton(id)); } @SuppressWarnings("unused") protected  EntityVersionStoreJdbc();  EntityVersionStoreJdbc(EntityStoreOptions<Id, M, V> options); @Override EntityUpdateBatch<Id, M, V> updateBatch(Id id); @Override EntityUpdateBatch<Id, M, V> updateBatch(Collection<Id> docIds);  }