@Test public void getAll() { final Set<T> results = service.getOwned(); assertThat(results, hasSize(2)); final Set<T> canEditTrueResults = results.stream() .filter(SavedSearch::isCanEdit) .collect(Collectors.toSet()); assertThat(canEditTrueResults, hasSize(2)); }
@Override public Set<T> getOwned() { final Long userId = userEntityAuditorAware.getCurrentAuditor().getUserId(); return augmentOutputWithDisplayNames(crudRepository.findByActiveTrueAndUser_UserId(userId)); }
AbstractSavedSearchService implements SavedSearchService<T, B> { @Override public Set<T> getOwned() { final Long userId = userEntityAuditorAware.getCurrentAuditor().getUserId(); return augmentOutputWithDisplayNames(crudRepository.findByActiveTrueAndUser_UserId(userId)); } }
AbstractSavedSearchService implements SavedSearchService<T, B> { @Override public Set<T> getOwned() { final Long userId = userEntityAuditorAware.getCurrentAuditor().getUserId(); return augmentOutputWithDisplayNames(crudRepository.findByActiveTrueAndUser_UserId(userId)); } protected  AbstractSavedSearchService(final SavedSearchRepository<T, B> crudRepository,
                                         final SharedToUserRepository sharedToUserRepository,
                                         final SharedToEveryoneRepository sharedToEveryoneRepository,
                                         final AuditorAware<UserEntity> userEntityAuditorAware,
                                         final TagNameFactory tagNameFactory,
                                         final Class<T> type); }
AbstractSavedSearchService implements SavedSearchService<T, B> { @Override public Set<T> getOwned() { final Long userId = userEntityAuditorAware.getCurrentAuditor().getUserId(); return augmentOutputWithDisplayNames(crudRepository.findByActiveTrueAndUser_UserId(userId)); } protected  AbstractSavedSearchService(final SavedSearchRepository<T, B> crudRepository,
                                         final SharedToUserRepository sharedToUserRepository,
                                         final SharedToEveryoneRepository sharedToEveryoneRepository,
                                         final AuditorAware<UserEntity> userEntityAuditorAware,
                                         final TagNameFactory tagNameFactory,
                                         final Class<T> type); @Override Set<T> getOwned(); @Override Set<T> getShared(); @Override T get(final long id); @Override T create(final T search); @Override T update(final T search); @Override T updateShared(final T search); @Override void deleteById(final long id); @Override T getDashboardSearch(final long id); }
AbstractSavedSearchService implements SavedSearchService<T, B> { @Override public Set<T> getOwned() { final Long userId = userEntityAuditorAware.getCurrentAuditor().getUserId(); return augmentOutputWithDisplayNames(crudRepository.findByActiveTrueAndUser_UserId(userId)); } protected  AbstractSavedSearchService(final SavedSearchRepository<T, B> crudRepository,
                                         final SharedToUserRepository sharedToUserRepository,
                                         final SharedToEveryoneRepository sharedToEveryoneRepository,
                                         final AuditorAware<UserEntity> userEntityAuditorAware,
                                         final TagNameFactory tagNameFactory,
                                         final Class<T> type); @Override Set<T> getOwned(); @Override Set<T> getShared(); @Override T get(final long id); @Override T create(final T search); @Override T update(final T search); @Override T updateShared(final T search); @Override void deleteById(final long id); @Override T getDashboardSearch(final long id);  }