code: public static Node getEndNode(GraphDatabaseService db, long id) {
          Relationship rel = db.getRelationshipById(id);
          return rel.getEndNode();
      }
docs: /*public static ExplicitIndexHits nodeQueryIndex(String indexName, Object query, GraphDatabaseService db) throws Exception {
  return getReadOperation(db).nodeExplicitIndexQuery(indexName, query);
  }
  
  public static ExplicitIndexHits relationshipQueryIndex(String indexName, Object query, GraphDatabaseService db, Long startNode, Long endNode) throws Exception {
  long startingNode = (startNode == null) ? -1 : startNode;
  long endingNode = (endNode == null) ? -1 : endNode;
  return getReadOperation(db).relationshipExplicitIndexQuery(indexName, query, startingNode, endingNode);
  }