Ejemplo n.º 1
0
 public Collection<Workspace> findByTags(String[] filter) {
   assert filter != null;
   Collection<Workspace> result;
   if (filter.length == 0) {
     result = workspaceRepository.findAll();
   } else {
     result = new ArrayList<Workspace>();
     for (String tag : filter) {
       if (result.isEmpty()) {
         result = workspaceRepository.findByTagName(tag);
       } else {
         result.retainAll(workspaceRepository.findByTagName(tag));
       }
     }
   }
   assert result != null;
   return result;
 }
Ejemplo n.º 2
0
 public List<Workspace> findAll() {
   return workspaceRepository.findAll();
 }