Map<Integer, Resource> resources = loadResourceMap(subject, criteria.getFilterResourceIds());
PageList<DriftComposite> results = new PageList<DriftComposite>();
for (MongoDBChangeSetEntry entry : entries) {
MongoDBChangeSet changeSet = entry.getChangeSet();
DriftDTO driftDTO = mapper.toDTO(entry);
if (criteria.isFetchChangeSet()) {
DriftChangeSetDTO changeSetDTO = mapper.toDTO(changeSet);
driftDTO.setChangeSet(changeSetDTO);
}
results.add(new DriftComposite(driftDTO, resources.get(changeSet.getResourceId()),
changeSet.getDriftDefinitionName()));
}