diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index 255275ff131..1d983920746 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -396,44 +396,6 @@ public abstract class BaseHapiFhirDao implements IDao, } } - protected TagList getTags(RequestDetails theRequest, Class theResourceType, IIdType theResourceId) { - String resourceName = null; - if (theResourceType != null) { - resourceName = toResourceName(theResourceType); - if (theResourceId != null && theResourceId.hasVersionIdPart()) { - IFhirResourceDao dao = getDao(theResourceType); - BaseHasResource entity = dao.readEntity(theResourceId, theRequest); - TagList retVal = new TagList(); - for (BaseTag next : entity.getTags()) { - retVal.add(next.getTag().toTag()); - } - return retVal; - } - } - - Set tagIds = new HashSet<>(); - findMatchingTagIds(theRequest, resourceName, theResourceId, tagIds, ResourceTag.class); - findMatchingTagIds(theRequest, resourceName, theResourceId, tagIds, ResourceHistoryTag.class); - if (tagIds.isEmpty()) { - return new TagList(); - } - { - CriteriaBuilder builder = myEntityManager.getCriteriaBuilder(); - CriteriaQuery cq = builder.createQuery(TagDefinition.class); - Root from = cq.from(TagDefinition.class); - cq.where(from.get("myId").in(tagIds)); - cq.orderBy(builder.asc(from.get("mySystem")), builder.asc(from.get("myCode"))); - TypedQuery q = myEntityManager.createQuery(cq); - q.setMaxResults(getConfig().getHardTagListLimit()); - - TagList retVal = new TagList(); - for (TagDefinition next : q.getResultList()) { - retVal.add(next.toTag()); - } - - return retVal; - } - } protected IBundleProvider history(RequestDetails theRequest, String theResourceName, Long theId, Date theSince, Date theUntil) {