/**
* Converts an EDBCommit object into an EKBCommit object.
*/
private EKBCommit convertEDBCommitToEKBCommit(EDBCommit commit) throws EKBException {
EKBCommit result = new EKBCommit();
Map<ModelDescription, Class<?>> cache = new HashMap<>();
result.setRevisionNumber(commit.getRevisionNumber());
result.setComment(commit.getComment());
result.setParentRevisionNumber(commit.getParentRevisionNumber());
result.setDomainId(commit.getDomainId());
result.setConnectorId(commit.getConnectorId());
result.setInstanceId(commit.getInstanceId());
for (EDBObject insert : commit.getInserts()) {
result.addInsert(createModelOfEDBObject(insert, cache));
}
for (EDBObject update : commit.getUpdates()) {
result.addUpdate(createModelOfEDBObject(update, cache));
}
for (String delete : commit.getDeletions()) {
EDBObject object = edbService.getObject(delete, commit.getTimestamp());
result.addDelete(createModelOfEDBObject(object, cache));
}
return result;
}