Package ca.uhn.fhir.interceptor.model
Class RequestPartitionId
java.lang.Object
ca.uhn.fhir.interceptor.model.RequestPartitionId
- All Implemented Interfaces:
IModelJson
- Since:
- 5.0.0
-
Field Summary
Fields inherited from interface ca.uhn.fhir.model.api.IModelJson
SENSITIVE_DATA_FILTER_NAME -
Method Summary
Modifier and TypeMethodDescriptionstatic RequestPartitionIdasJson()booleancontains(RequestPartitionId theOther) Returns true if this partition defintion contains the other.static RequestPartitionIdDeprecated.static RequestPartitionIddefaultPartition(LocalDate thePartitionDate) Deprecated.booleanstatic RequestPartitionIdforPartitionIdAndName(Integer thePartitionId, String thePartitionName, LocalDate thePartitionDate) static RequestPartitionIdforPartitionIdsAndNames(List<String> thePartitionNames, List<Integer> thePartitionIds, LocalDate thePartitionDate) static RequestPartitionIdstatic RequestPartitionIdfromPartitionId(Integer thePartitionId) static RequestPartitionIdfromPartitionId(Integer thePartitionId, LocalDate thePartitionDate) static RequestPartitionIdfromPartitionIdAndName(Integer thePartitionId, String thePartitionName) static RequestPartitionIdfromPartitionIds(Integer... thePartitionIds) static RequestPartitionIdfromPartitionIds(Collection<Integer> thePartitionIds) static RequestPartitionIdfromPartitionIds(Collection<Integer> thePartitionIds, LocalDate thePartitionDate) static RequestPartitionIdfromPartitionName(String thePartitionName) static RequestPartitionIdfromPartitionName(String thePartitionName, LocalDate thePartitionDate) static RequestPartitionIdfromPartitionNames(String... thePartitionNames) static RequestPartitionIdfromPartitionNames(List<String> thePartitionNames) static Optional<RequestPartitionId>getPartitionIfAssigned(IBaseResource theFromResource) booleanDeprecated.booleanhasDefaultPartitionId(Integer theDefaultPartitionId) Test whether this request partition has the default partition as one of its targeted partitions.inthashCode()booleanhasPartitionId(Integer thePartitionId) booleanbooleanbooleanbooleanDeprecated.useisDefaultPartition(Integer)orIRequestPartitionHelperSvc.isDefaultPartitioninstead .booleanisDefaultPartition(Integer theDefaultPartitionId) Test whether this request partition is for a given default partition ID.booleanisPartitionCovered(Integer thePartitionId) mergeIds(RequestPartitionId theOther) Creates a new RequestPartitionId which includes all partition IDs from thisRequestPartitionIdbut also includes all IDs from the givenRequestPartitionId.static StringstringifyForKey(RequestPartitionId theRequestPartitionId) Create a string representation suitable for use as a cache key.toJson()toString()
-
Method Details
-
getPartitionIfAssigned
@Nonnull public static Optional<RequestPartitionId> getPartitionIfAssigned(IBaseResource theFromResource) -
mergeIds
Creates a new RequestPartitionId which includes all partition IDs from thisRequestPartitionIdbut also includes all IDs from the givenRequestPartitionId. Any duplicates are only included once, and partition names and dates are ignored and not returned. ThisRequestPartitionIdand theOther are not modified.- Since:
- 7.4.0
-
fromJson
public static RequestPartitionId fromJson(String theJson) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
isAllPartitions
-
isPartitionCovered
-
getPartitionDate
-
getPartitionNames
-
getPartitionIds
-
toString
-
contains
Returns true if this partition defintion contains the other. Compatible with equals: a.contains(b) && b.contains(a) ==> a.equals(b). We can't implement Comparable because this is only a partial order. -
equals
-
hashCode
-
toJson
-
getFirstPartitionIdOrNull
-
getFirstPartitionNameOrNull
-
isDefaultPartition
Deprecated.useisDefaultPartition(Integer)orIRequestPartitionHelperSvc.isDefaultPartitioninstead .Returns true if this request partition contains only one partition ID and it is the DEFAULT partition ID (null) -
isDefaultPartition
Test whether this request partition is for a given default partition ID. This method can be directly invoked on a requestPartition object providing thattheDefaultPartitionIdis known or throughIRequestPartitionHelperSvc.isDefaultPartitionwhere the implementer of the interface will provide the default partition id (seeIRequestPartitionHelperSvc.getDefaultPartition).- Parameters:
theDefaultPartitionId- is the ID that was given to the default partition. The default partition ID can be NULL as per default or specifically assigned another value. See PartitionSettings#setDefaultPartitionId.- Returns:
trueif the request partition contains only one partition ID and the partition ID istheDefaultPartitionId.
-
hasPartitionId
-
hasPartitionIds
-
hasPartitionNames
-
hasDefaultPartitionId
Deprecated.usehasDefaultPartitionId(Integer)orIRequestPartitionHelperSvc.hasDefaultPartitionIdinsteadVerifies that one of the requested partition is the default partition which is assumed to have a default value of null.- Returns:
- true if one of the requested partition is the default partition(null).
-
hasDefaultPartitionId
Test whether this request partition has the default partition as one of its targeted partitions. This method can be directly invoked on a requestPartition object providing thattheDefaultPartitionIdis known or throughIRequestPartitionHelperSvc.hasDefaultPartitionIdwhere the implementer of the interface will provide the default partition id (seeIRequestPartitionHelperSvc.getDefaultPartition).- Parameters:
theDefaultPartitionId- is the ID that was given to the default partition. The default partition ID can be NULL as per default or specifically assigned another value. See PartitionSettings#setDefaultPartitionId.- Returns:
trueif the request partition has the default partition as one of the targeted partition.
-
getPartitionIdsWithoutDefault
-
allPartitions
-
defaultPartition
Deprecated. -
defaultPartition
@Deprecated @Nonnull public static RequestPartitionId defaultPartition(@Nullable LocalDate thePartitionDate) Deprecated. -
fromPartitionId
-
fromPartitionId
@Nonnull public static RequestPartitionId fromPartitionId(@Nullable Integer thePartitionId, @Nullable LocalDate thePartitionDate) -
fromPartitionIds
@Nonnull public static RequestPartitionId fromPartitionIds(@Nonnull Collection<Integer> thePartitionIds) -
fromPartitionIds
@Nonnull public static RequestPartitionId fromPartitionIds(@Nonnull Collection<Integer> thePartitionIds, @Nullable LocalDate thePartitionDate) -
fromPartitionIds
-
fromPartitionName
-
fromPartitionName
@Nonnull public static RequestPartitionId fromPartitionName(@Nullable String thePartitionName, @Nullable LocalDate thePartitionDate) -
fromPartitionNames
@Nonnull public static RequestPartitionId fromPartitionNames(@Nullable List<String> thePartitionNames) -
fromPartitionNames
-
fromPartitionIdAndName
@Nonnull public static RequestPartitionId fromPartitionIdAndName(@Nullable Integer thePartitionId, @Nullable String thePartitionName) -
forPartitionIdAndName
@Nonnull public static RequestPartitionId forPartitionIdAndName(@Nullable Integer thePartitionId, @Nullable String thePartitionName, @Nullable LocalDate thePartitionDate) -
forPartitionIdsAndNames
@Nonnull public static RequestPartitionId forPartitionIdsAndNames(List<String> thePartitionNames, List<Integer> thePartitionIds, LocalDate thePartitionDate) -
stringifyForKey
Create a string representation suitable for use as a cache key. Null aware.Returns the partition IDs (numeric) as a joined string with a space between, using the string "null" for any null values
-
asJson
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
hasDefaultPartitionId(Integer)orIRequestPartitionHelperSvc.hasDefaultPartitionIdinstead