final List<Integer> list = operationAllowedRepository.findAllIds(spec, OperationAllowedId_.metadataId);
final MetadataRepository metadataRepository = context.getBean(MetadataRepository.class);
Sort sortByChangeDateDesc = new Sort(Sort.Direction.DESC, Metadata_.dataInfo.getName()+"."+MetadataDataInfo_.changeDate);
Element result = metadataRepository.findAllAsXml(MetadataSpecs.hasMetadataIdIn(list), sortByChangeDateDesc);
Element formatEl = new Element("format");
formatEl.setText(format.toLowerCase());