diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java index 3a3a6640054..6445feb67eb 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java @@ -108,19 +108,6 @@ public class IdHelperService { myForcedIdDao.deleteByPid(forcedId.getId()); } - /** - * Given a resource type and ID, looks up the resource and returns a {@link IResourceLookup}. This - * object contains the internal PID for the resource and the resource deletion status, making it sufficient - * for persisting resource links between resources without adding any further database calls after the - * single one performed by this call. - * - * @throws ResourceNotFoundException If the ID can not be found - */ - @Nonnull - public ResourcePersistentId translateForcedIdToPid(IIdType theId, RequestDetails theRequestDetails) { - return translateForcedIdToPid(theId.getResourceType(), theId.getIdPart(), theRequestDetails); - } - /** * Given a forced ID, convert it to it's Long value. Since you are allowed to use string IDs for resources, we need to * convert those to the underlying Long values that are stored, for lookup and comparison purposes. @@ -178,10 +165,10 @@ public class IdHelperService { if (myDaoConfig.getResourceClientIdStrategy() != DaoConfig.ClientIdStrategyEnum.ANY) { theIds .stream() - .filter(t -> isValidPid(t)) - .map(t -> t.getIdPartAsLong()) - .map(t -> new ResourcePersistentId(t)) - .forEach(t -> retVal.add(t)); + .filter(IdHelperService::isValidPid) + .map(IIdType::getIdPartAsLong) + .map(ResourcePersistentId::new) + .forEach(retVal::add); } ListMultimap typeToIds = organizeIdsByResourceType(theIds);