@Test public void testDelete() throws Exception { underTest.start(); RoutingRule rule = createRoutingRule("asdf", "asdf2"); assertThat(underTest.list(), hasSize(1)); underTest.delete(rule); assertThat(underTest.list(), hasSize(0)); }
@Override public void delete(final RoutingRule rule) { checkNotNull(rule); inTx(databaseInstance).run(db -> entityAdapter.deleteEntity(db, castToOrientRoutingRule(rule))); }
OrientRoutingRuleStore extends StateGuardLifecycleSupport implements RoutingRuleStore { @Override public void delete(final RoutingRule rule) { checkNotNull(rule); inTx(databaseInstance).run(db -> entityAdapter.deleteEntity(db, castToOrientRoutingRule(rule))); } }
OrientRoutingRuleStore extends StateGuardLifecycleSupport implements RoutingRuleStore { @Override public void delete(final RoutingRule rule) { checkNotNull(rule); inTx(databaseInstance).run(db -> entityAdapter.deleteEntity(db, castToOrientRoutingRule(rule))); } @Inject  OrientRoutingRuleStore(@Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> databaseInstance,
                                final OrientRoutingRuleEntityAdapter entityAdapter); }
OrientRoutingRuleStore extends StateGuardLifecycleSupport implements RoutingRuleStore { @Override public void delete(final RoutingRule rule) { checkNotNull(rule); inTx(databaseInstance).run(db -> entityAdapter.deleteEntity(db, castToOrientRoutingRule(rule))); } @Inject  OrientRoutingRuleStore(@Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> databaseInstance,
                                final OrientRoutingRuleEntityAdapter entityAdapter); @Override @Guarded(by = STARTED) RoutingRule create(final RoutingRule rule); @Override @Guarded(by = STARTED) void update(final RoutingRule rule); @Override @Guarded(by = STARTED) List<RoutingRule> list(); @Override void delete(final RoutingRule rule); @Override RoutingRule getByName(final String name); @Override RoutingRule getById(final String id); @Override RoutingRule newRoutingRule(); }
OrientRoutingRuleStore extends StateGuardLifecycleSupport implements RoutingRuleStore { @Override public void delete(final RoutingRule rule) { checkNotNull(rule); inTx(databaseInstance).run(db -> entityAdapter.deleteEntity(db, castToOrientRoutingRule(rule))); } @Inject  OrientRoutingRuleStore(@Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> databaseInstance,
                                final OrientRoutingRuleEntityAdapter entityAdapter); @Override @Guarded(by = STARTED) RoutingRule create(final RoutingRule rule); @Override @Guarded(by = STARTED) void update(final RoutingRule rule); @Override @Guarded(by = STARTED) List<RoutingRule> list(); @Override void delete(final RoutingRule rule); @Override RoutingRule getByName(final String name); @Override RoutingRule getById(final String id); @Override RoutingRule newRoutingRule();  }