Package ca.uhn.fhir.jpa.search
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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.transaction.PlatformTransactionManager
-
Constructor Summary
ConstructorsConstructorDescriptionPersistedJpaBundleProvider(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, Search theSearch)
ConstructorPersistedJpaBundleProvider(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, String theSearchUuid)
Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.protected List<org.hl7.fhir.instance.model.api.IBaseResource>
doSearchOrEverything(int theFromIndex, int theToIndex)
boolean
Returns false if the entity can't be foundca.uhn.fhir.model.primitive.InstantDt
List<org.hl7.fhir.instance.model.api.IBaseResource>
getResources(int theFromIndex, int theToIndex)
getUuid()
protected boolean
void
setContext(ca.uhn.fhir.context.FhirContext theContext)
void
setDaoConfigForUnitTest(ca.uhn.fhir.jpa.api.config.DaoConfig theDaoConfig)
void
setDaoRegistryForUnitTest(ca.uhn.fhir.jpa.api.dao.DaoRegistry theDaoRegistry)
void
setEntityManager(javax.persistence.EntityManager theEntityManager)
void
setInterceptorBroadcaster(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster)
void
setSearchBuilderFactoryForUnitTest(SearchBuilderFactory theSearchBuilderFactory)
void
setSearchCacheSvcForUnitTest(ISearchCacheSvc theSearchCacheSvc)
void
setSearchCoordinatorSvcForUnitTest(ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc theSearchCoordinatorSvc)
protected void
setSearchEntity(Search theSearchEntity)
void
setTxManagerForUnitTest(org.springframework.transaction.PlatformTransactionManager theTxManager)
size()
protected List<org.hl7.fhir.instance.model.api.IBaseResource>
toResourceList(ISearchBuilder theSearchBuilder, List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> thePids)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.rest.api.server.IBundleProvider
getAllResourceIds, getAllResources, getCurrentPageId, getCurrentPageOffset, getCurrentPageSize, getNextPageId, getPreviousPageId, isEmpty, sizeOrThrowNpe
-
Field Details
-
myTxManager
-
-
Constructor Details
-
PersistedJpaBundleProvider
public PersistedJpaBundleProvider(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, String theSearchUuid)Constructor -
PersistedJpaBundleProvider
public PersistedJpaBundleProvider(ca.uhn.fhir.rest.api.server.RequestDetails theRequest, Search theSearch)Constructor
-
-
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
Returns false if the entity can't be found -
getPublished
- Specified by:
getPublished
in interfaceca.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 interfaceca.uhn.fhir.rest.api.server.IBundleProvider
-
getUuid
- Specified by:
getUuid
in interfaceca.uhn.fhir.rest.api.server.IBundleProvider
-
getCacheStatus
-
preferredPageSize
- Specified by:
preferredPageSize
in interfaceca.uhn.fhir.rest.api.server.IBundleProvider
-
setContext
-
setEntityManager
-
setSearchCoordinatorSvcForUnitTest
public void setSearchCoordinatorSvcForUnitTest(ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc theSearchCoordinatorSvc) -
setTxManagerForUnitTest
public void setTxManagerForUnitTest(org.springframework.transaction.PlatformTransactionManager theTxManager) -
setSearchEntity
-
size
- Specified by:
size
in interfaceca.uhn.fhir.rest.api.server.IBundleProvider
-
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
-
setDaoRegistryForUnitTest
-
setDaoConfigForUnitTest
-
setSearchBuilderFactoryForUnitTest
-