Class PersistedJpaBundleProvider

java.lang.Object
ca.uhn.fhir.jpa.search.PersistedJpaBundleProvider
All Implemented Interfaces:
ca.uhn.fhir.rest.api.server.IBundleProvider
Direct Known Subclasses:
PersistedJpaSearchFirstPageBundleProvider

public class PersistedJpaBundleProvider extends Object implements ca.uhn.fhir.rest.api.server.IBundleProvider
  • Field Details

    • myTxManager

      @Autowired protected org.springframework.transaction.PlatformTransactionManager myTxManager
  • Constructor Details

  • Method Details

    • clearCachedDataForUnitTest

      When HAPI FHIR server is running "for real", a new instance of the bundle provider is created to serve every HTTP request, so it's ok for us to keep state in here and expect that it will go away. But in unit tests we keep this object around for longer sometimes.
    • doSearchOrEverything

      protected List<org.hl7.fhir.instance.model.api.IBaseResource> doSearchOrEverything(int theFromIndex, int theToIndex)
    • ensureSearchEntityLoaded

      public boolean ensureSearchEntityLoaded()
      Returns false if the entity can't be found
    • getPublished

      public ca.uhn.fhir.model.primitive.InstantDt getPublished()
      Specified by:
      getPublished in interface ca.uhn.fhir.rest.api.server.IBundleProvider
    • getResources

      @Nonnull public List<org.hl7.fhir.instance.model.api.IBaseResource> getResources(int theFromIndex, int theToIndex)
      Specified by:
      getResources in interface ca.uhn.fhir.rest.api.server.IBundleProvider
    • getUuid

      public String getUuid()
      Specified by:
      getUuid in interface ca.uhn.fhir.rest.api.server.IBundleProvider
    • getCacheStatus

    • preferredPageSize

      Specified by:
      preferredPageSize in interface ca.uhn.fhir.rest.api.server.IBundleProvider
    • setContext

      public void setContext(ca.uhn.fhir.context.FhirContext theContext)
    • setEntityManager

      public void setEntityManager(javax.persistence.EntityManager theEntityManager)
    • setSearchCoordinatorSvcForUnitTest

      public void setSearchCoordinatorSvcForUnitTest(ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc theSearchCoordinatorSvc)
    • setTxManagerForUnitTest

      public void setTxManagerForUnitTest(org.springframework.transaction.PlatformTransactionManager theTxManager)
    • setSearchEntity

      protected void setSearchEntity(Search theSearchEntity)
    • size

      public Integer size()
      Specified by:
      size in interface ca.uhn.fhir.rest.api.server.IBundleProvider
    • hasIncludes

      protected boolean hasIncludes()
    • toResourceList

      protected List<org.hl7.fhir.instance.model.api.IBaseResource> toResourceList(ISearchBuilder theSearchBuilder, List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> thePids)
    • setInterceptorBroadcaster

      public void setInterceptorBroadcaster(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster)
    • setSearchCacheSvcForUnitTest

      public void setSearchCacheSvcForUnitTest(ISearchCacheSvc theSearchCacheSvc)
    • setDaoRegistryForUnitTest

      public void setDaoRegistryForUnitTest(ca.uhn.fhir.jpa.api.dao.DaoRegistry theDaoRegistry)
    • setDaoConfigForUnitTest

      public void setDaoConfigForUnitTest(ca.uhn.fhir.jpa.api.config.DaoConfig theDaoConfig)
    • setSearchBuilderFactoryForUnitTest

      public void setSearchBuilderFactoryForUnitTest(SearchBuilderFactory theSearchBuilderFactory)