class PipelineRunDao extends NamedParameterJdbcDaoSupport {

    @Transactional(propagation = Propagation.SUPPORTS)
    public List<PipelineRun> loadActiveSharedRuns(final PagingRunFilterVO filter, final PipelineUser user) {
        final MapSqlParameterSource params = getPagingParameters(filter);
        final String query = wherePattern.matcher(loadActiveServicesQuery)
                .replaceFirst(makeRunSidsCondition(user, params));
        final List<PipelineRun> services = getNamedParameterJdbcTemplate()
                .query(query, params, PipelineRunParameters.getRowMapper());
        if (CollectionUtils.isEmpty(services)) {
            return services;
        }
        final MapSqlParameterSource sidParams = new MapSqlParameterSource();
        final Map<Long, PipelineRun> idToRun = services.stream().collect(Collectors.toMap(BaseEntity::getId,
                Function.identity()));
        sidParams.addValue(LIST_PARAMETER, idToRun.keySet());
        final List<RunSid> runSids = getNamedParameterJdbcTemplate()
                .query(loadRunSidsQueryForList, sidParams, PipelineRunParameters.getRunSidsRowMapper());
        ListUtils.emptyIfNull(runSids).forEach(sid -> {
            final PipelineRun run = idToRun.get(sid.getRunId());
            if (run.getRunSids() == null) {
                run.setRunSids(new ArrayList<>());
            }
            run.getRunSids().add(sid);
        });
        return services;
    }

}