115116117118119120121122
final String sql = " select " + rm.schema() + " where h.id = ?"; return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { holidayId }); } catch (final EmptyResultDataAccessException e) { throw new HolidayNotFoundException(holidayId); } }
2829303132333435
this.repository = repository; } public Holiday findOneWithNotFoundDetection(final Long id) { final Holiday holiday = this.repository.findOne(id); if (holiday == null) { throw new HolidayNotFoundException(id); } return holiday; }