cleanup
This commit is contained in:
parent
4281648a33
commit
a1733ed3eb
|
@ -1373,11 +1373,11 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> extends BaseStora
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createHistoryEntry(RequestDetails theRequest, IBaseResource theResource, ResourceTable entity, EncodedResource changed) {
|
private void createHistoryEntry(RequestDetails theRequest, IBaseResource theResource, ResourceTable theEntity, EncodedResource theChanged) {
|
||||||
boolean versionedTags = getConfig().getTagStorageMode() == DaoConfig.TagStorageModeEnum.VERSIONED;
|
boolean versionedTags = getConfig().getTagStorageMode() == DaoConfig.TagStorageModeEnum.VERSIONED;
|
||||||
final ResourceHistoryTable historyEntry = entity.toHistory(versionedTags);
|
final ResourceHistoryTable historyEntry = theEntity.toHistory(versionedTags);
|
||||||
historyEntry.setEncoding(changed.getEncoding());
|
historyEntry.setEncoding(theChanged.getEncoding());
|
||||||
historyEntry.setResource(changed.getResource());
|
historyEntry.setResource(theChanged.getResource());
|
||||||
|
|
||||||
ourLog.debug("Saving history entry {}", historyEntry.getIdDt());
|
ourLog.debug("Saving history entry {}", historyEntry.getIdDt());
|
||||||
myResourceHistoryTableDao.save(historyEntry);
|
myResourceHistoryTableDao.save(historyEntry);
|
||||||
|
@ -1406,8 +1406,8 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> extends BaseStora
|
||||||
if (haveSource || haveRequestId) {
|
if (haveSource || haveRequestId) {
|
||||||
ResourceHistoryProvenanceEntity provenance = new ResourceHistoryProvenanceEntity();
|
ResourceHistoryProvenanceEntity provenance = new ResourceHistoryProvenanceEntity();
|
||||||
provenance.setResourceHistoryTable(historyEntry);
|
provenance.setResourceHistoryTable(historyEntry);
|
||||||
provenance.setResourceTable(entity);
|
provenance.setResourceTable(theEntity);
|
||||||
provenance.setPartitionId(entity.getPartitionId());
|
provenance.setPartitionId(theEntity.getPartitionId());
|
||||||
if (haveRequestId) {
|
if (haveRequestId) {
|
||||||
provenance.setRequestId(left(requestId, Constants.REQUEST_ID_LENGTH));
|
provenance.setRequestId(left(requestId, Constants.REQUEST_ID_LENGTH));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue