@Test public void onPropertyUpdateRemovesTheOldVertexFromTheIdIndexBeforeAddingTheNewOne() { UUID timId = UUID.randomUUID(); Vertex oldVertex = vertexWithId(timId); Vertex newVertex = vertexWithId(timId); instance.onPropertyUpdate(NULL_COLLECTION, Optional.of(oldVertex), newVertex); verify(indexHandler).upsertIntoIdIndex(timId, newVertex); }
@Override public void onPropertyUpdate(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex) { indexHandler.upsertIntoIdIndex(UUID.fromString(newVertex.value("tim_id")), newVertex); }
IdIndexChangeListener implements ChangeListener { @Override public void onPropertyUpdate(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex) { indexHandler.upsertIntoIdIndex(UUID.fromString(newVertex.value("tim_id")), newVertex); } }
IdIndexChangeListener implements ChangeListener { @Override public void onPropertyUpdate(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex) { indexHandler.upsertIntoIdIndex(UUID.fromString(newVertex.value("tim_id")), newVertex); } IdIndexChangeListener(IndexHandler indexHandler); }
IdIndexChangeListener implements ChangeListener { @Override public void onPropertyUpdate(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex) { indexHandler.upsertIntoIdIndex(UUID.fromString(newVertex.value("tim_id")), newVertex); } IdIndexChangeListener(IndexHandler indexHandler); @Override void onCreate(Collection collection, Vertex vertex); @Override void onPropertyUpdate(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex); @Override void onRemoveFromCollection(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex); @Override void onAddToCollection(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex); @Override void onCreateEdge(Collection collection, Edge edge); @Override void onEdgeUpdate(Collection collection, Edge oldEdge, Edge newEdge); }
IdIndexChangeListener implements ChangeListener { @Override public void onPropertyUpdate(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex) { indexHandler.upsertIntoIdIndex(UUID.fromString(newVertex.value("tim_id")), newVertex); } IdIndexChangeListener(IndexHandler indexHandler); @Override void onCreate(Collection collection, Vertex vertex); @Override void onPropertyUpdate(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex); @Override void onRemoveFromCollection(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex); @Override void onAddToCollection(Collection collection, Optional<Vertex> oldVertex, Vertex newVertex); @Override void onCreateEdge(Collection collection, Edge edge); @Override void onEdgeUpdate(Collection collection, Edge oldEdge, Edge newEdge);  }