class ToolGroupDao extends NamedParameterJdbcDaoSupport {

    @Transactional(propagation = Propagation.SUPPORTS)
    public List<ToolGroup> loadToolGroupsByNameAndRegistryName(String groupName, String registryName) {
        MapSqlParameterSource params = new MapSqlParameterSource();
        params.addValue(ToolGroupParameters.GROUP_NAME.name(), groupName);
        params.addValue("REGISTRY_NAME", registryName, Types.VARCHAR);

        return getNamedParameterJdbcTemplate().query(loadToolGroupsByNameAndRegistryNameQuery, params,
                                                     ToolGroupParameters.getRowMapper());
    }

}