Commit dc5c4dad authored by Grzegorz Pietrusza's avatar Grzegorz Pietrusza

collapse lambdas

parent 64377571
......@@ -36,22 +36,12 @@ public class SolutionsRepository implements Repository
{
//todo: merge with upper
//todo: use morphia filter
// List<Solution> solutions = datastore.createQuery(Solution.class).asList();
List<Solution> solutions = datastore.createQuery(Solution.class)
// .filter("team", team)
.asList();
List<Solution> collect = solutions.stream()
.filter(new Predicate<Solution>()
{
@Override
public boolean test(Solution solution)
{
return solution.getTeam().equals(team);
}
})
.filter(solution -> solution.getTeam().equals(team))
.collect(Collectors.toList());
return collect;
// return datastore.createQuery(Solution.class).filter("team", team).asList();
//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