@Test public void shouldDeleteVxlan() { Vxlan vxlan = createVxlan(); transactionManager.doInTransaction(() -> vxlanRepository.remove(vxlan)); assertEquals(0, vxlanRepository.findAll().size()); }
@Override public Collection<Vxlan> findAll() { return framedGraph().traverse(g -> g.V() .hasLabel(VxlanFrame.FRAME_LABEL)) .toListExplicit(VxlanFrame.class).stream() .map(Vxlan::new) .collect(Collectors.toList()); }
FermaVxlanRepository extends FermaGenericRepository<Vxlan, VxlanData, VxlanFrame> implements VxlanRepository { @Override public Collection<Vxlan> findAll() { return framedGraph().traverse(g -> g.V() .hasLabel(VxlanFrame.FRAME_LABEL)) .toListExplicit(VxlanFrame.class).stream() .map(Vxlan::new) .collect(Collectors.toList()); } }
FermaVxlanRepository extends FermaGenericRepository<Vxlan, VxlanData, VxlanFrame> implements VxlanRepository { @Override public Collection<Vxlan> findAll() { return framedGraph().traverse(g -> g.V() .hasLabel(VxlanFrame.FRAME_LABEL)) .toListExplicit(VxlanFrame.class).stream() .map(Vxlan::new) .collect(Collectors.toList()); } FermaVxlanRepository(FramedGraphFactory<?> graphFactory, TransactionManager transactionManager); }
FermaVxlanRepository extends FermaGenericRepository<Vxlan, VxlanData, VxlanFrame> implements VxlanRepository { @Override public Collection<Vxlan> findAll() { return framedGraph().traverse(g -> g.V() .hasLabel(VxlanFrame.FRAME_LABEL)) .toListExplicit(VxlanFrame.class).stream() .map(Vxlan::new) .collect(Collectors.toList()); } FermaVxlanRepository(FramedGraphFactory<?> graphFactory, TransactionManager transactionManager); @Override Collection<Vxlan> findAll(); @Override Collection<Vxlan> findByPathId(PathId pathId, PathId oppositePathId); @Override boolean exists(int vxlan); @Override Optional<Integer> findFirstUnassignedVxlan(int lowestVxlan, int highestVxlan); }
FermaVxlanRepository extends FermaGenericRepository<Vxlan, VxlanData, VxlanFrame> implements VxlanRepository { @Override public Collection<Vxlan> findAll() { return framedGraph().traverse(g -> g.V() .hasLabel(VxlanFrame.FRAME_LABEL)) .toListExplicit(VxlanFrame.class).stream() .map(Vxlan::new) .collect(Collectors.toList()); } FermaVxlanRepository(FramedGraphFactory<?> graphFactory, TransactionManager transactionManager); @Override Collection<Vxlan> findAll(); @Override Collection<Vxlan> findByPathId(PathId pathId, PathId oppositePathId); @Override boolean exists(int vxlan); @Override Optional<Integer> findFirstUnassignedVxlan(int lowestVxlan, int highestVxlan);  }