Class ResourceIndexedComboStringUnique
- All Implemented Interfaces:
IResourceIndexComboSearchParameter
,Serializable
,Comparable<ResourceIndexedComboStringUnique>
This table does not include the partition ID in the uniqueness check. This was the case when this table was originally created. In other words, the uniqueness constraint does not include the partition column, and would therefore not be able to guarantee uniqueness local to a partition.
TODO: HAPI FHIR 7.4.0 introduced hashes to this table - In a future release we should move the uniqueness constraint over to using them instead of the long string. At that time we could probably decide whether it makes sense to include the partition ID in the uniqueness check. Null values will be an issue there, we may need to introduce a rule that if you want to enforce uniqueness on a partitioned system you need a non-null default partition ID?
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructorResourceIndexedComboStringUnique
(ResourceTable theResource, String theIndexString, org.hl7.fhir.instance.model.api.IIdType theSearchParameterId) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic long
calculateHashComplete
(String theQueryString) static long
calculateHashComplete2
(String theQueryString) void
void
int
<T extends BaseResourceIndex>
voidcopyMutableValuesFrom
(T theSource) boolean
Subclasses must implementgetId()
int
hashCode()
Subclasses must implementvoid
setHashComplete
(Long theHashComplete) void
setHashComplete2
(Long theHashComplete2) void
void
setIndexString
(String theIndexString) void
This is called when reindexing a resource on the previously existing index rows.void
setResource
(ResourceTable theResource) toString()
Methods inherited from class ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedCombo
getSearchParameterId, setSearchParameterId
Methods inherited from class ca.uhn.fhir.jpa.model.entity.BaseResourceIndex
setPartitionId
Methods inherited from class ca.uhn.fhir.jpa.model.entity.BasePartitionable
getPartitionId
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.jpa.model.entity.IResourceIndexComboSearchParameter
getSearchParameterId, setSearchParameterId
-
Field Details
-
MAX_STRING_LENGTH
- See Also:
-
IDX_IDXCMPSTRUNIQ_STRING
- See Also:
-
IDX_IDXCMPSTRUNIQ_RESOURCE
- See Also:
-
HFJ_IDX_CMP_STRING_UNIQ
- See Also:
-
-
Constructor Details
-
ResourceIndexedComboStringUnique
public ResourceIndexedComboStringUnique()Constructor -
ResourceIndexedComboStringUnique
public ResourceIndexedComboStringUnique(ResourceTable theResource, String theIndexString, org.hl7.fhir.instance.model.api.IIdType theSearchParameterId) Constructor
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ResourceIndexedComboStringUnique>
-
equals
Description copied from class:BaseResourceIndex
Subclasses must implement- Specified by:
equals
in classBaseResourceIndex
-
copyMutableValuesFrom
- Specified by:
copyMutableValuesFrom
in classBaseResourceIndex
-
getIndexString
- Specified by:
getIndexString
in interfaceIResourceIndexComboSearchParameter
-
setIndexString
-
getResource
- Specified by:
getResource
in interfaceIResourceIndexComboSearchParameter
-
setResource
- Specified by:
setResource
in interfaceIResourceIndexComboSearchParameter
-
getId
- Specified by:
getId
in classBaseResourceIndex
-
setId
- Specified by:
setId
in classBaseResourceIndex
-
getHashComplete
-
setHashComplete
-
getHashComplete2
-
setHashComplete2
-
setPlaceholderHashesIfMissing
Description copied from class:BaseResourceIndex
This is called when reindexing a resource on the previously existing index rows. This method should set zero/0 values for the hashes, in order to avoid any calculating hashes on existing rows failing. This is important only in cases where hashes are not present on the existing rows, which would only be the case if new hash columns have been added.- Overrides:
setPlaceholderHashesIfMissing
in classBaseResourceIndex
-
calculateHashes
- Specified by:
calculateHashes
in classBaseResourceIndex
-
calculateHashComplete
-
calculateHashComplete2
-
clearHashes
- Specified by:
clearHashes
in classBaseResourceIndex
-
hashCode
Description copied from class:BaseResourceIndex
Subclasses must implement- Specified by:
hashCode
in classBaseResourceIndex
-
toString
- Overrides:
toString
in classBasePartitionable
-