code: protected static KeyedGraph prepareGraph(Connection connection,
                                               String inputTable,
                                               String orientation,
                                               String weight,
                                               Class vertexClass,
                                               Class edgeClass) throws SQLException {
          GraphFunctionParser parser = new GraphFunctionParser();
          parser.parseWeightAndOrientation(orientation, weight);
  
          return new GraphCreator(connection,
                  inputTable,
                  parser.getGlobalOrientation(), parser.getEdgeOrientation(), parser.getWeightColumn(),
                  vertexClass,
                  edgeClass).prepareGraph();
      }
docs: Return a JGraphT graph from the input edges table.
  
  @param connection  Connection
  @param inputTable  Input table name
  @param orientation Orientation string
  @param weight      Weight column name, null for unweighted graphs
  @param vertexClass
  @param edgeClass
  @return Graph
  @throws java.sql.SQLException