What about lambdaj? http://code.google.com/p/lambdaj It should be something like:
Collection<User> activeUsers = filter(havingValue(on(User.class).isActive()), userService.getByGroupId(12)); Collection<Integer> activeUserIds = extract(activeUsers, on(User.class).getId());
(Yes, it is still kind of ugly...)
What about lambdaj? http://code.google.com/p/lambdaj
It should be something like:
Collection<User> activeUsers = filter(havingValue(on(User.class).isActive()), userService.getByGroupId(12));
Collection<Integer> activeUserIds = extract(activeUsers, on(User.class).getId());
(Yes, it is still kind of ugly...)