//--------------------------------------------------------------------------
private Vector<OperationAllowedId> retrievePrivileges(ServiceContext context, String id, String userId, String groupId) throws Exception {
OperationAllowedRepository opAllowRepo = context.getBean(OperationAllowedRepository.class);
Integer iMetadataId = Integer.valueOf(id);
Integer iUserId = Integer.valueOf(userId);
Integer iGroupId = Integer.valueOf(groupId);
Specification<OperationAllowed> spec =
where(hasMetadataId(iMetadataId))
.and(hasGroupId(iGroupId));
List<OperationAllowed> operationsAllowed = opAllowRepo.findAllWithOwner(iUserId, Optional.of(spec));
Vector<OperationAllowedId> result = new Vector<OperationAllowedId>();
for (OperationAllowed operationAllowed : operationsAllowed) {
result.add(operationAllowed.getId());
}