@Test public void testFromRootEntityWithValidId(){ GraphVisitor repository = new MockGraphVisitor(); GraphQueryImpl graphQueryImpl = new GraphQueryImpl(repository); Entity.ID sourceEntityID = Entity.ID.valueOf("urn:entity:" + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "." + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "/" + UUID.randomUUID()); GraphTraversal fromRootEntity = graphQueryImpl.fromRootEntity(sourceEntityID); AssertJUnit.assertNotNull(fromRootEntity); }
@Override public Queries.GraphTraversal fromRootEntity(ID id) { Preconditions.argumentNotNull(id, "id"); pipeline.add(new GetEntityByID(id)); return this; }
GraphQueryImpl implements Queries.GraphQuery, Queries.GraphTraversal { @Override public Queries.GraphTraversal fromRootEntity(ID id) { Preconditions.argumentNotNull(id, "id"); pipeline.add(new GetEntityByID(id)); return this; } }
GraphQueryImpl implements Queries.GraphQuery, Queries.GraphTraversal { @Override public Queries.GraphTraversal fromRootEntity(ID id) { Preconditions.argumentNotNull(id, "id"); pipeline.add(new GetEntityByID(id)); return this; } GraphQueryImpl(GraphVisitor repository); }
GraphQueryImpl implements Queries.GraphQuery, Queries.GraphTraversal { @Override public Queries.GraphTraversal fromRootEntity(ID id) { Preconditions.argumentNotNull(id, "id"); pipeline.add(new GetEntityByID(id)); return this; } GraphQueryImpl(GraphVisitor repository); @Override Queries.GraphTraversal selectAdjacentEntitiesVia(
			Relationship.Name name); @Override Queries.GraphTraversal selectAdjacentEntitiesVia(
			Relationship.Name name, Direction direction); @Override Queries.GraphTraversal selectAdjacentRelationships(
			Relationship.Name name); @Override Queries.GraphTraversal selectAdjacentRelationships(
			Relationship.Name name, Direction direction); @Override Queries.GraphTraversal where(Predicate predicate); @Override Queries.GraphTraversal fromRootEntity(ID id); @Override Projection select(); }
GraphQueryImpl implements Queries.GraphQuery, Queries.GraphTraversal { @Override public Queries.GraphTraversal fromRootEntity(ID id) { Preconditions.argumentNotNull(id, "id"); pipeline.add(new GetEntityByID(id)); return this; } GraphQueryImpl(GraphVisitor repository); @Override Queries.GraphTraversal selectAdjacentEntitiesVia(
			Relationship.Name name); @Override Queries.GraphTraversal selectAdjacentEntitiesVia(
			Relationship.Name name, Direction direction); @Override Queries.GraphTraversal selectAdjacentRelationships(
			Relationship.Name name); @Override Queries.GraphTraversal selectAdjacentRelationships(
			Relationship.Name name, Direction direction); @Override Queries.GraphTraversal where(Predicate predicate); @Override Queries.GraphTraversal fromRootEntity(ID id); @Override Projection select();  }