class PipelineRunDao extends NamedParameterJdbcDaoSupport {

    @Transactional(propagation = Propagation.MANDATORY)
    public void updateRunsLastNotification(Collection<PipelineRun> runs) {
        if (CollectionUtils.isEmpty(runs)) {
            return;
        }

        MapSqlParameterSource[] params = runs.stream()
            .map(run -> PipelineRunParameters.getParameters(run, getConnection()))
            .toArray(MapSqlParameterSource[]::new);

        getNamedParameterJdbcTemplate().batchUpdate(updateLastNotificationQuery, params);
    }

}