This commit is contained in:
James Agnew 2021-07-02 05:29:49 -04:00 committed by GitHub
parent a4fb72975d
commit 4bb495e9d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.model.entity;
import ca.uhn.fhir.interceptor.model.RequestPartitionId;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
@ -84,12 +85,12 @@ public class PartitionablePartitionId implements Cloneable {
return RequestPartitionId.fromPartitionId(getPartitionId(), getPartitionDate());
}
@Nullable
@Nonnull
public static RequestPartitionId toRequestPartitionId(@Nullable PartitionablePartitionId theRequestPartitionId) {
if (theRequestPartitionId != null) {
return theRequestPartitionId.toPartitionId();
} else {
return null;
return RequestPartitionId.defaultPartition();
}
}
}