test_class.declarator: objDbReader
test_class.modifier: private
test_class.original_string: private ScoreDistributionReader objDbReader;
test_class.type: ScoreDistributionReader
test_class.var_name: objDbReader
test_class.file: phenol-annotations/src/test/java/org/monarchinitiative/phenol/annotations/scoredist/H2ScoreDistributionReaderTest.java
test_class.identifier: H2ScoreDistributionReaderTest
test_case.body: @Test
    void readAll() throws Exception{
      Map<Integer, ScoreDistribution> results = objDbReader.readAll();
      assertEquals(results.size(), 1);
    }
test_case.class_method_signature: H2ScoreDistributionReaderTest.readAll()
test_case.full_signature: @Test void readAll()
test_case.identifier: readAll
test_case.invocations: readAll assertEquals size
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void readAll()
focal_class.declarator: pathDb
focal_class.modifier: private final
focal_class.original_string: private final String pathDb;
focal_class.type: String
focal_class.var_name: pathDb
focal_class.declarator: tableName
focal_class.modifier: private final
focal_class.original_string: private final String tableName;
focal_class.type: String
focal_class.var_name: tableName
focal_class.declarator: conn
focal_class.modifier: private final
focal_class.original_string: private final Connection conn;
focal_class.type: Connection
focal_class.var_name: conn
focal_class.declarator: H2_SELECT_TERM_COUNTS = "SELECT DISTINCT num_terms from %s"
focal_class.modifier: private static final
focal_class.original_string: private static final String H2_SELECT_TERM_COUNTS = "SELECT DISTINCT num_terms from %s";
focal_class.type: String
focal_class.var_name: H2_SELECT_TERM_COUNTS
focal_class.declarator: H2_SELECT_BY_TERM_COUNT_STATEMENT =
        "SELECT num_terms, object_id, sample_size, scores, p_values FROM %s WHERE num_terms = ?"
focal_class.modifier: private static final
focal_class.original_string: private static final String H2_SELECT_BY_TERM_COUNT_STATEMENT =
        "SELECT num_terms, object_id, sample_size, scores, p_values FROM %s WHERE num_terms = ?";
focal_class.type: String
focal_class.var_name: H2_SELECT_BY_TERM_COUNT_STATEMENT
focal_class.declarator: H2_SELECT_BY_TERM_COUNT_AND_OBJECT_STATEMENT =
        "SELECT num_terms, object_id, sample_size, scores, p_values FROM %s WHERE num_terms = ? AND object_id = ?"
focal_class.modifier: private static final
focal_class.original_string: private static final String H2_SELECT_BY_TERM_COUNT_AND_OBJECT_STATEMENT =
        "SELECT num_terms, object_id, sample_size, scores, p_values FROM %s WHERE num_terms = ? AND object_id = ?";
focal_class.type: String
focal_class.var_name: H2_SELECT_BY_TERM_COUNT_AND_OBJECT_STATEMENT
focal_class.file: phenol-annotations/src/main/java/org/monarchinitiative/phenol/annotations/scoredist/H2ScoreDistributionReader.java
focal_class.identifier: H2ScoreDistributionReader
focal_class.interfaces: implements ScoreDistributionReader
focal_class.class_method_signature: H2ScoreDistributionReader.H2ScoreDistributionReader(String pathDb, String tableName)
focal_class.full_signature: public  H2ScoreDistributionReader(String pathDb, String tableName)
focal_class.identifier: H2ScoreDistributionReader
focal_class.modifiers: public
focal_class.parameters: (String pathDb, String tableName)
focal_class.signature:  H2ScoreDistributionReader(String pathDb, String tableName)
focal_class.class_method_signature: H2ScoreDistributionReader.openConnection()
focal_class.full_signature: private Connection openConnection()
focal_class.identifier: openConnection
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Connection
focal_class.signature: Connection openConnection()
focal_class.class_method_signature: H2ScoreDistributionReader.readForTermCountAndObject(int termCount, TermId objectId)
focal_class.full_signature: @Override public ObjectScoreDistribution readForTermCountAndObject(int termCount, TermId objectId)
focal_class.identifier: readForTermCountAndObject
focal_class.modifiers: @Override public
focal_class.parameters: (int termCount, TermId objectId)
focal_class.return: ObjectScoreDistribution
focal_class.signature: ObjectScoreDistribution readForTermCountAndObject(int termCount, TermId objectId)
focal_class.class_method_signature: H2ScoreDistributionReader.objectScoreDistributionFromResultSet(ResultSet rs)
focal_class.full_signature: private ObjectScoreDistribution objectScoreDistributionFromResultSet(ResultSet rs)
focal_class.identifier: objectScoreDistributionFromResultSet
focal_class.modifiers: private
focal_class.parameters: (ResultSet rs)
focal_class.return: ObjectScoreDistribution
focal_class.signature: ObjectScoreDistribution objectScoreDistributionFromResultSet(ResultSet rs)
focal_class.class_method_signature: H2ScoreDistributionReader.readForTermCount(int termCount)
focal_class.full_signature: @Override public ScoreDistribution readForTermCount(int termCount)
focal_class.identifier: readForTermCount
focal_class.modifiers: @Override public
focal_class.parameters: (int termCount)
focal_class.return: ScoreDistribution
focal_class.signature: ScoreDistribution readForTermCount(int termCount)
focal_class.class_method_signature: H2ScoreDistributionReader.readAll()
focal_class.full_signature: @Override public Map<Integer, ScoreDistribution> readAll()
focal_class.identifier: readAll
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<Integer, ScoreDistribution>
focal_class.signature: Map<Integer, ScoreDistribution> readAll()
focal_class.class_method_signature: H2ScoreDistributionReader.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: @Override
    public Map<Integer, ScoreDistribution> readAll() throws PhenolException {
      // Get all term counts.
      final List<Integer> termCounts = new ArrayList<>();
      try (final PreparedStatement stmt =
              conn.prepareStatement(String.format(H2_SELECT_TERM_COUNTS, tableName));
          final ResultSet rs = stmt.executeQuery()) {
        while (rs.next()) {
          termCounts.add(rs.getInt(1));
        }
      } catch (SQLException e) {
        throw new PhenolException("Problem querying the database for term counts", e);
      }
  
      // Query for all term counts.
      final Map<Integer, ScoreDistribution> result = new HashMap<>();
      for (int termCount : termCounts) {
        result.put(termCount, readForTermCount(termCount));
      }
      return result;
    }
focal_method.class_method_signature: H2ScoreDistributionReader.readAll()
focal_method.full_signature: @Override public Map<Integer, ScoreDistribution> readAll()
focal_method.identifier: readAll
focal_method.invocations: prepareStatement format executeQuery next add getInt put readForTermCount
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Map<Integer, ScoreDistribution>
focal_method.signature: Map<Integer, ScoreDistribution> readAll()