class ToolVulnerabilityDao extends NamedParameterJdbcDaoSupport {

    public List<Vulnerability> loadVulnerabilities(long toolId, String version) {
        MapSqlParameterSource params = new MapSqlParameterSource();
        params.addValue(ToolVulnerabilityColumns.TOOL_ID.name(), toolId);
        params.addValue(ToolVulnerabilityColumns.VERSION.name(), version);

        return getNamedParameterJdbcTemplate().query(loadVulnerabilitiesByToolAndVersionQuery, params,
                                                     ToolVulnerabilityColumns.getRowMapper());
    }

}