final ImageData imageData = this.jdbcTemplate.queryForObject(sql, imageMapper, new Object[] { clientId });
final ContentRepository contentRepository = this.contentRepositoryFactory.getRepository(imageData.storageType());
final ImageData result = contentRepository.fetchImage(imageData);
if (result.getContent() == null) { throw new ImageNotFoundException("clients", clientId); }
return result;
} catch (final EmptyResultDataAccessException e) {
throw new ImageNotFoundException("clients", clientId);
}
}