* @param date the validation date time
*/
private void saveValidationStatus (String id, Map<String, Integer[]> valTypeAndStatus, String date) throws Exception {
clearValidationStatus(id);
final MetadataValidationRepository validationRepository = _applicationContext.getBean(MetadataValidationRepository.class);
for (Map.Entry<String, Integer[]> entry : valTypeAndStatus.entrySet()) {
String type = entry.getKey();
Integer[] results = entry.getValue();
MetadataValidation metadataValidation = new MetadataValidation()
.setStatus(MetadataValidationStatus.values()[results[0]])
.setTested(results[1])
.setFailed(results[2])
.setValidationDate(new ISODate(date));
MetadataValidationId validationId = new MetadataValidationId(Integer.valueOf(id), type);
metadataValidation.setId(validationId);
validationRepository.save(metadataValidation);
}
}