
Package ca.uhn.fhir.jpa.model.dao
Class JpaPid
java.lang.Object
ca.uhn.fhir.rest.api.server.storage.BaseResourcePersistentId<Long>
ca.uhn.fhir.jpa.model.dao.JpaPid
- All Implemented Interfaces:
ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId<Long>,Comparable<JpaPid>
@Embeddable
public class JpaPid
extends ca.uhn.fhir.rest.api.server.storage.BaseResourcePersistentId<Long>
implements Comparable<JpaPid>
JPA implementation of IResourcePersistentId. JPA uses a Long as the primary key. This class should be used in any
context where the pid is known to be a Long.
-
Field Summary
Fields inherited from interface ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanNote that equals and hashCode for this object only consider the ID and Partition ID because this class gets used as cache keysstatic JpaPidfromId(IdAndPartitionId theId) static JpaPidstatic JpaPidfromId(Long theResourceId, PartitionablePartitionId thePartitionId) static JpaPidstatic JpaPidfromIdAndResourceType(Long theId, String theResourceType) static JpaPidfromIdAndVersion(Long theId, Long theVersion) static JpaPidfromIdAndVersionAndResourceType(Long theId, Long theVersion, String theResourceType) fromLongList(Collection<Long> theResultList) getId()inthashCode()Note that equals and hashCode for this object only consider the ID and Partition ID because this class gets used as cache keysvoidsetPartitionablePartitionId(PartitionablePartitionId thePartitionablePartitionId) voidsetPartitionId(Integer thePartitionId) setPartitionIdIfNotAlreadySet(Integer thePartitionId) toFk()toLongList(JpaPid[] thePids) toLongList(Collection<JpaPid> thePids) toLongSet(Collection<JpaPid> thePids) toString()Methods inherited from class ca.uhn.fhir.rest.api.server.storage.BaseResourcePersistentId
getAssociatedResourceId, getResourceType, getVersion, setAssociatedResourceId, setResourceType, setVersion
-
Constructor Details
-
JpaPid
public JpaPid()Constructor - Do not call this directly, only used for JPA instantiation -
JpaPid
-
JpaPid
-
-
Method Details
-
getPartitionablePartitionId
-
setPartitionablePartitionId
-
setPartitionIdIfNotAlreadySet
-
getPartitionId
- Specified by:
getPartitionIdin interfaceca.uhn.fhir.rest.api.server.storage.IResourcePersistentId<Long>
-
setPartitionId
-
equals
Note that equals and hashCode for this object only consider the ID and Partition ID because this class gets used as cache keys- Overrides:
equalsin classca.uhn.fhir.rest.api.server.storage.BaseResourcePersistentId<Long>
-
hashCode
Note that equals and hashCode for this object only consider the ID and Partition ID because this class gets used as cache keys- Overrides:
hashCodein classca.uhn.fhir.rest.api.server.storage.BaseResourcePersistentId<Long>
-
getId
- Specified by:
getIdin interfaceca.uhn.fhir.rest.api.server.storage.IResourcePersistentId<Long>
-
setId
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<JpaPid>
-
toFk
-
toLongList
-
toLongList
-
toLongSet
-
fromLongList
-
fromId
-
fromId
-
fromId
-
fromIdAndVersion
-
fromIdAndResourceType
-
fromIdAndVersionAndResourceType
public static JpaPid fromIdAndVersionAndResourceType(Long theId, Long theVersion, String theResourceType) -
fromId
-