// send emails about downloaded file to groups with notify privilege
OperationAllowedRepository opAllowedRepo = context.getBean(OperationAllowedRepository.class);
final GroupRepository groupRepository = context.getBean(GroupRepository.class);
List<OperationAllowed> opsAllowed = opAllowedRepo.findByMetadataId(id);
for (OperationAllowed opAllowed : opsAllowed) {
Group group = groupRepository.findOne(opAllowed.getId().getGroupId());
String name = group.getName();
String email = group.getEmail();