Package ca.uhn.fhir.jpa.model.entity
Class ResourceSearchUrlEntity
java.lang.Object
ca.uhn.fhir.jpa.model.entity.ResourceSearchUrlEntity
This entity is used to enforce uniqueness on a given search URL being
used as a conditional operation URL, e.g. a conditional create or a
conditional update. When we perform a conditional operation that is
creating a new resource, we store an entity with the conditional URL
in this table. The URL is the PK of the table, so the database
ensures that two concurrent threads don't accidentally create two
resources with the same conditional URL.
Note that this entity is partitioned, but does not always respect the partition ID of the parent resource entity (it may just use a hardcoded partition ID of -1 depending on configuration). As a result we don't have a FK relationship. This table only contains short-lived rows that get cleaned up and purged periodically, so it should never grow terribly large anyhow.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceSearchUrlEntity
from
(String theUrl, ResourceTable theResourceTable, boolean theSearchUrlDuplicateAcrossPartitionsEnabled) getPk()
setCreatedTime
(Date theCreatedTime) setPartitionDate
(LocalDate thePartitionDate) setPk
(ResourceSearchUrlEntityPK thePk) setResourcePid
(Long theResourcePid) setResourceTable
(ResourceTable theResourceTable) toString()
-
Field Details
-
RES_SEARCH_URL_COLUMN_NAME
- See Also:
-
PARTITION_ID
- See Also:
-
-
Constructor Details
-
ResourceSearchUrlEntity
public ResourceSearchUrlEntity()
-
-
Method Details
-
from
public static ResourceSearchUrlEntity from(String theUrl, ResourceTable theResourceTable, boolean theSearchUrlDuplicateAcrossPartitionsEnabled) -
getPk
-
setPk
-
getResourcePid
-
setResourcePid
-
setResourceTable
-
getCreatedTime
-
setCreatedTime
-
getSearchUrl
-
getPartitionId
-
getPartitionDate
-
setPartitionDate
-
toString
-