/** search for the project corresponding to the query. */ @Transactional(readOnly = true) public List<Project> search(String query) { log.debug("REST request to search Projects for query {}", query); return StreamSupport.stream( projectSearchRepository.search(queryStringQuery(query)).spliterator(), false) .collect(Collectors.toList()); }
/** delete the project by id. */ public void delete(Long id) { log.debug("Request to delete Project : {}", id); projectRepository.delete(id); projectSearchRepository.delete(id); }
/** * Save a project. * * @return the persisted entity */ public Project save(Project project) { log.debug("Request to save Project : {}", project); Project result = projectRepository.save(project); projectSearchRepository.save(result); return result; }