@Test @DisplayName("update columns for multiple entities") void updateColumnsForMultiple() { ProjectId id1 = createId(1); ProjectId id2 = createId(2); ProjectId id3 = createId(3); TestProcessManagerRepository repository = repository(); TestProcessManager pm1 = new TestProcessManager(id1); TestProcessManager pm2 = new TestProcessManager(id2); TestProcessManager pm3 = new TestProcessManager(id3); repository.store(pm1); repository.store(pm2); repository.store(pm3); repository.applyMigration(ImmutableSet.of(id1, id2), new UpdatePmColumns<>()); QueryFilter filter1 = QueryFilter.eq(Project.Column.idString(), id1.toString()); QueryFilter filter2 = QueryFilter.eq(Project.Column.idString(), id2.toString()); QueryFilter filter3 = QueryFilter.eq(Project.Column.idString(), id3.toString()); TargetFilters filters = targetFilters(filter1, filter2, filter3); Iterator<TestProcessManager> found = repository.find(filters, ResponseFormat.getDefaultInstance()); ImmutableList<TestProcessManager> results = ImmutableList.copyOf(found); Project expectedState1 = pm1 .state() .toBuilder() .setIdString(pm1.getIdString()) .build(); Project expectedState2 = pm2 .state() .toBuilder() .setIdString(pm2.getIdString()) .build(); assertThat(results).hasSize(2); assertThat(results) .comparingElementsUsing(entityState()) .containsExactly(expectedState1, expectedState2); }
@Override public final void store(P entity) { cache.store(entity); }
ProcessManagerRepository extends EventDispatchingRepository<I, P, S> implements CommandDispatcherDelegate, EventProducingRepository { @Override public final void store(P entity) { cache.store(entity); } }
ProcessManagerRepository extends EventDispatchingRepository<I, P, S> implements CommandDispatcherDelegate, EventProducingRepository { @Override public final void store(P entity) { cache.store(entity); } protected  ProcessManagerRepository(); }
ProcessManagerRepository extends EventDispatchingRepository<I, P, S> implements CommandDispatcherDelegate, EventProducingRepository { @Override public final void store(P entity) { cache.store(entity); } protected  ProcessManagerRepository(); @Override @OverridingMethodsMustInvokeSuper void registerWith(BoundedContext context); @Override final EventBus eventBus(); @Override final ImmutableSet<EventClass> messageClasses(); @Override final ImmutableSet<EventClass> domesticEventClasses(); @Override final ImmutableSet<EventClass> externalEventClasses(); @Override final ImmutableSet<CommandClass> commandClasses(); @Override ImmutableSet<EventClass> outgoingEvents(); @Override final void dispatchCommand(CommandEnvelope command); @OverridingMethodsMustInvokeSuper @Override P create(I id); @Override final void store(P entity); @OverridingMethodsMustInvokeSuper @Override void close(); }
ProcessManagerRepository extends EventDispatchingRepository<I, P, S> implements CommandDispatcherDelegate, EventProducingRepository { @Override public final void store(P entity) { cache.store(entity); } protected  ProcessManagerRepository(); @Override @OverridingMethodsMustInvokeSuper void registerWith(BoundedContext context); @Override final EventBus eventBus(); @Override final ImmutableSet<EventClass> messageClasses(); @Override final ImmutableSet<EventClass> domesticEventClasses(); @Override final ImmutableSet<EventClass> externalEventClasses(); @Override final ImmutableSet<CommandClass> commandClasses(); @Override ImmutableSet<EventClass> outgoingEvents(); @Override final void dispatchCommand(CommandEnvelope command); @OverridingMethodsMustInvokeSuper @Override P create(I id); @Override final void store(P entity); @OverridingMethodsMustInvokeSuper @Override void close();  }