Package ca.uhn.fhir.jpa.dao.index
Class DaoResourceLinkResolver<T extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId>
java.lang.Object
ca.uhn.fhir.jpa.dao.index.DaoResourceLinkResolver<T>
- All Implemented Interfaces:
IResourceLinkResolver
public class DaoResourceLinkResolver<T extends ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId>
extends Object
implements IResourceLinkResolver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends org.hl7.fhir.instance.model.api.IBaseResource>
Optional<IBasePersistedResource> createPlaceholderTargetIfConfiguredToDoSo
(Class<T> theType, org.hl7.fhir.instance.model.api.IBaseReference theReference, String theIdToAssignToPlaceholder, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) protected CanonicalIdentifier
extractIdentifierFromUrl
(String theValue) Extracts the first available identifier from the URL partfindTargetResource
(RequestPartitionId theRequestPartitionId, String theSourceResourceName, PathAndRef thePathAndRef, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) org.hl7.fhir.instance.model.api.IBaseResource
loadTargetResource
(RequestPartitionId theRequestPartitionId, String theSourceResourceName, PathAndRef thePathAndRef, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) void
validateTypeOrThrowException
(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theType)
-
Constructor Details
-
DaoResourceLinkResolver
public DaoResourceLinkResolver()
-
-
Method Details
-
findTargetResource
public IResourceLookup findTargetResource(@Nonnull RequestPartitionId theRequestPartitionId, String theSourceResourceName, PathAndRef thePathAndRef, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
findTargetResource
in interfaceIResourceLinkResolver
-
loadTargetResource
@Nullable public org.hl7.fhir.instance.model.api.IBaseResource loadTargetResource(@Nonnull RequestPartitionId theRequestPartitionId, String theSourceResourceName, PathAndRef thePathAndRef, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Specified by:
loadTargetResource
in interfaceIResourceLinkResolver
-
createPlaceholderTargetIfConfiguredToDoSo
public <T extends org.hl7.fhir.instance.model.api.IBaseResource> Optional<IBasePersistedResource> createPlaceholderTargetIfConfiguredToDoSo(Class<T> theType, org.hl7.fhir.instance.model.api.IBaseReference theReference, @Nullable String theIdToAssignToPlaceholder, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) - Parameters:
theIdToAssignToPlaceholder
- If specified, the placeholder resource created will be given a specific ID
-
extractIdentifierFromUrl
Extracts the first available identifier from the URL part- Parameters:
theValue
- Part of the URL to extract identifiers from- Returns:
- Returns the first available identifier in the canonical form or null if URL contains no identifier param
- Throws:
IllegalArgumentException
- IllegalArgumentException is thrown in case identifier parameter can not be split usingsystem|value
pattern.
-
validateTypeOrThrowException
public void validateTypeOrThrowException(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theType) - Specified by:
validateTypeOrThrowException
in interfaceIResourceLinkResolver
-