@Test public void testValidCommit() throws IOException { final FirstBean object = new FirstBean(); object.id = null; object.name = "Test"; try (DataStoreTransaction t = multiplexManager.beginTransaction()) { assertFalse(t.loadObjects(FirstBean.class, Optional.empty(), Optional.empty(), Optional.empty(), null) .iterator().hasNext()); t.createObject(object, null); assertFalse(t.loadObjects(FirstBean.class, Optional.empty(), Optional.empty(), Optional.empty(), null) .iterator().hasNext()); t.commit(null); } try (DataStoreTransaction t = multiplexManager.beginTransaction()) { Iterable<Object> beans = t.loadObjects(FirstBean.class, Optional.empty(), Optional.empty(), Optional.empty(), null); assertNotNull(beans); assertTrue(beans.iterator().hasNext()); FirstBean bean = (FirstBean) IterableUtils.first(beans); assertTrue(bean.id != null && "Test".equals(bean.name)); } }
@Override public DataStoreTransaction beginTransaction() { return new MultiplexWriteTransaction(this); }
MultiplexManager implements DataStore { @Override public DataStoreTransaction beginTransaction() { return new MultiplexWriteTransaction(this); } }
MultiplexManager implements DataStore { @Override public DataStoreTransaction beginTransaction() { return new MultiplexWriteTransaction(this); } MultiplexManager(DataStore... dataStores); }
MultiplexManager implements DataStore { @Override public DataStoreTransaction beginTransaction() { return new MultiplexWriteTransaction(this); } MultiplexManager(DataStore... dataStores); @Override void populateEntityDictionary(EntityDictionary dictionary); @Override DataStoreTransaction beginTransaction(); @Override DataStoreTransaction beginReadTransaction(); EntityDictionary getDictionary(); }
MultiplexManager implements DataStore { @Override public DataStoreTransaction beginTransaction() { return new MultiplexWriteTransaction(this); } MultiplexManager(DataStore... dataStores); @Override void populateEntityDictionary(EntityDictionary dictionary); @Override DataStoreTransaction beginTransaction(); @Override DataStoreTransaction beginReadTransaction(); EntityDictionary getDictionary();  }