RED-8702: Explore document databases to store entityLog
* refactoring
This commit is contained in:
parent
2d283d4d12
commit
6824beded5
@ -1,7 +1,6 @@
|
||||
package com.iqser.red.service.redaction.v1.server.mongo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
@ -10,9 +9,9 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import com.iqser.red.service.persistence.management.v1.processor.document.EntityLogDocument;
|
||||
import com.iqser.red.service.persistence.management.v1.processor.document.EntityLogEntryDocument;
|
||||
import com.iqser.red.service.persistence.management.v1.processor.utils.ObjectConverterUtils;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntityLog;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntityLogEntry;
|
||||
import com.knecon.fforesight.databasetenantcommons.providers.utils.MagicConverter;
|
||||
|
||||
@Service
|
||||
public class EntityLogMongoService {
|
||||
@ -188,7 +187,7 @@ public class EntityLogMongoService {
|
||||
private static EntityLog fromDocument(EntityLogDocument entityLogDocument) {
|
||||
|
||||
EntityLog entityLog = new EntityLog();
|
||||
MagicConverter.copyAllFields(entityLogDocument, entityLog);
|
||||
ObjectConverterUtils.copyAllFields(entityLogDocument, entityLog);
|
||||
entityLog.setEntityLogEntry(entityLogDocument.getEntityLogEntryDocument()
|
||||
.stream()
|
||||
.map(EntityLogMongoService::fromDocument)
|
||||
@ -200,7 +199,7 @@ public class EntityLogMongoService {
|
||||
private static EntityLogEntry fromDocument(EntityLogEntryDocument entityLogEntryDocument) {
|
||||
|
||||
EntityLogEntry entityLogEntry = new EntityLogEntry();
|
||||
MagicConverter.copyAllFields(entityLogEntryDocument, entityLogEntry);
|
||||
ObjectConverterUtils.copyAllFields(entityLogEntryDocument, entityLogEntry);
|
||||
entityLogEntry.setId(entityLogEntryDocument.getEntryId());
|
||||
return entityLogEntry;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user