Commit dc5c4dad authored by Grzegorz Pietrusza's avatar Grzegorz Pietrusza

collapse lambdas

parent 64377571
...@@ -36,22 +36,12 @@ public class SolutionsRepository implements Repository ...@@ -36,22 +36,12 @@ public class SolutionsRepository implements Repository
{ {
//todo: merge with upper //todo: merge with upper
//todo: use morphia filter //todo: use morphia filter
// List<Solution> solutions = datastore.createQuery(Solution.class).asList();
List<Solution> solutions = datastore.createQuery(Solution.class) List<Solution> solutions = datastore.createQuery(Solution.class)
// .filter("team", team)
.asList(); .asList();
List<Solution> collect = solutions.stream() List<Solution> collect = solutions.stream()
.filter(new Predicate<Solution>() .filter(solution -> solution.getTeam().equals(team))
{
@Override
public boolean test(Solution solution)
{
return solution.getTeam().equals(team);
}
})
.collect(Collectors.toList()); .collect(Collectors.toList());
return collect; return collect;
// return datastore.createQuery(Solution.class).filter("team", team).asList();
//todo: group by task //todo: group by task
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment