186187188189190191192193194
} private Hook retrieveHookBy(final Long hookId) { final Hook hook = this.hookRepository.findOne(hookId); if (hook == null) { throw new HookNotFoundException(hookId.toString()); } return hook; }
636465666768697071
final String sql = "select " + rm.schema() + " where h.id = ?"; return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { hookId }); } catch (final EmptyResultDataAccessException e) { throw new HookNotFoundException(hookId); } }