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
Constructors -
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 CanonicalIdentifierextractIdentifierFromUrl(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.IBaseResourceloadTargetResource(RequestPartitionId theRequestPartitionId, String theSourceResourceName, PathAndRef thePathAndRef, ca.uhn.fhir.rest.api.server.RequestDetails theRequest, ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) voidvalidateTypeOrThrowException(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:
findTargetResourcein 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:
loadTargetResourcein 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|valuepattern.
-
validateTypeOrThrowException
public void validateTypeOrThrowException(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theType) - Specified by:
validateTypeOrThrowExceptionin interfaceIResourceLinkResolver
-