Refactor getEdges to use Vertex object

This commit is contained in:
Michael Lieberman
2014-12-30 15:10:21 -05:00
parent 6613bcd569
commit a61fc8ba20
2 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ public class AccumuloVertex extends AccumuloElement implements Vertex {
@Override
public Iterable<Edge> getEdges(Direction direction, String... labels) {
return globals.getVertexWrapper().getEdges(id, direction, labels);
return globals.getVertexWrapper().getEdges(this, direction, labels);
}
@Override

View File

@@ -62,10 +62,10 @@ public class VertexTableWrapper extends ElementTableWrapper {
Mutators.apply(getWriter(), new EdgeEndpointsMutator.Delete(edge));
}
public Iterable<Edge> getEdges(String vertexId, Direction direction,
public Iterable<Edge> getEdges(Vertex vertex, Direction direction,
String... labels) {
Scanner scan = getScanner();
scan.setRange(new Range(vertexId));
scan.setRange(new Range(vertex.getId().toString()));
if (direction.equals(Direction.IN)) {
scan.fetchColumnFamily(AccumuloGraph.TINEDGE);
} else if (direction.equals(Direction.OUT)) {