class RunScheduleDao extends NamedParameterJdbcDaoSupport {

    @Transactional(propagation = Propagation.MANDATORY)
    public void createRunSchedules(final List<RunSchedule> schedules) {
        final MapSqlParameterSource[] params = schedules.stream()
            .peek(s -> s.setId(this.createScheduleId()))
            .map(RunScheduleParameters::getParameters)
            .collect(Collectors.toList())
            .toArray(new MapSqlParameterSource[schedules.size()]);
        getNamedParameterJdbcTemplate().batchUpdate(createRunScheduleQuery, params);
    }

}