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 readForTermCountAndObject() throws Exception {
      TermId termId = TermId.of("MONDO", "001");
      ObjectScoreDistribution objScoreDist = objDbReader.readForTermCountAndObject(3, termId);
      assertEquals(objScoreDist.getObjectId(), termId);
    }
test_case.class_method_signature: H2ScoreDistributionReaderTest.readForTermCountAndObject()
test_case.full_signature: @Test void readForTermCountAndObject()
test_case.identifier: readForTermCountAndObject
test_case.invocations: of readForTermCountAndObject assertEquals getObjectId
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void readForTermCountAndObject()
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 ObjectScoreDistribution readForTermCountAndObject(int termCount, TermId objectId) throws PhenolException {
          try (final PreparedStatement stmt =
          conn.prepareStatement(
              String.format(H2_SELECT_BY_TERM_COUNT_AND_OBJECT_STATEMENT, tableName))) {
            stmt.setInt(1, termCount);
            try {
              stmt.setString(2, ObjHexStringConverter.object2hex(objectId));
            } catch (IOException e) {
              throw new RuntimeException("Unable to convert object id to hexadecimal String: " + objectId.toString());
            }
            try (final ResultSet rs = stmt.executeQuery()) {
          while (rs.next()) {
            return objectScoreDistributionFromResultSet(rs);
          }
        }
      } catch (SQLException e) {
        throw new PhenolException(
            "Problem with getting object score distribution for termCount: "
                + termCount
                + ", objectId: "
                + objectId);
      }
  
      throw new PhenolException(
          "Found no object for termCount: " + termCount + ", objectId: " + objectId);
    }
focal_method.class_method_signature: H2ScoreDistributionReader.readForTermCountAndObject(int termCount, TermId objectId)
focal_method.full_signature: @Override public ObjectScoreDistribution readForTermCountAndObject(int termCount, TermId objectId)
focal_method.identifier: readForTermCountAndObject
focal_method.invocations: prepareStatement format setInt setString object2hex toString executeQuery next objectScoreDistributionFromResultSet
focal_method.modifiers: @Override public
focal_method.parameters: (int termCount, TermId objectId)
focal_method.return: ObjectScoreDistribution
focal_method.signature: ObjectScoreDistribution readForTermCountAndObject(int termCount, TermId objectId)