RED-8670: integrate table inference from research
* introduce controllerAdvice to ControllerV2 package * remove unnecessary analysis requirement calculation for deleted files * silence javadoc lint warnings (e.g. no comment)
This commit is contained in:
parent
7010e4b1f9
commit
d3e1aa3ba0
@ -2,6 +2,7 @@ package com.iqser.red.service.persistence.management.v1.processor.service.persis
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -67,6 +68,7 @@ public class FileStatusPersistenceService {
|
||||
file.setFileManipulationDate(now);
|
||||
file.setProcessingErrorCounter(0);
|
||||
file.setFileSize(size);
|
||||
file.setComponentMappingVersions(new ArrayList<>());
|
||||
fileRepository.save(file);
|
||||
}
|
||||
|
||||
@ -97,21 +99,15 @@ public class FileStatusPersistenceService {
|
||||
|
||||
private int calculateProcessingErrorCounter(String fileId, ProcessingStatus processingStatus) {
|
||||
|
||||
switch (processingStatus) {
|
||||
case ERROR:
|
||||
return fileRepository.findById(fileId)
|
||||
.map(FileEntity::getProcessingErrorCounter)
|
||||
.orElse(0) + 1;
|
||||
|
||||
case PROCESSED:
|
||||
case REPROCESS:
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return fileRepository.findById(fileId)
|
||||
.map(FileEntity::getProcessingErrorCounter)
|
||||
.orElse(0);
|
||||
}
|
||||
return switch (processingStatus) {
|
||||
case ERROR -> fileRepository.findById(fileId)
|
||||
.map(FileEntity::getProcessingErrorCounter)
|
||||
.orElse(0) + 1;
|
||||
case PROCESSED, REPROCESS -> 0;
|
||||
default -> fileRepository.findById(fileId)
|
||||
.map(FileEntity::getProcessingErrorCounter)
|
||||
.orElse(0);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user