Package ca.uhn.fhir.jpa.api.dao
Class DaoRegistry
java.lang.Object
ca.uhn.fhir.jpa.api.dao.DaoRegistry
- All Implemented Interfaces:
IDaoRegistry,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class DaoRegistry
extends Object
implements org.springframework.context.ApplicationContextAware, IDaoRegistry
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorDaoRegistry(ca.uhn.fhir.context.FhirContext theFhirContext)Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetDaoOrThrowException(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theClass)<R extends org.hl7.fhir.instance.model.api.IBaseResource>
IFhirResourceDao<R>getResourceDao(Class<R> theResourceType)getResourceDao(String theResourceName)<T extends org.hl7.fhir.instance.model.api.IBaseResource>
IFhirResourceDao<T>getResourceDaoIfExists(Class<T> theResourceType)Deprecated.<T extends org.hl7.fhir.instance.model.api.IBaseResource>
IFhirResourceDao<T>getResourceDaoIfExists(String theResourceType)Deprecated.<T extends org.hl7.fhir.instance.model.api.IBaseResource>
IFhirResourceDao<T>getResourceDaoOrNull(Class<T> theResourceType)<T extends org.hl7.fhir.instance.model.api.IBaseResource>
IFhirResourceDao<T>getResourceDaoOrNull(String theResourceName)booleanisResourceTypeSupported(String theResourceType)voidregister(IFhirResourceDao theResourceDao)voidsetApplicationContext(org.springframework.context.ApplicationContext theApplicationContext)voidsetResourceDaos(Collection<IFhirResourceDao> theResourceDaos)voidsetSupportedResourceTypes(String... theResourceTypes)voidsetSupportedResourceTypes(Collection<String> theSupportedResourceTypes)
-
Constructor Details
-
DaoRegistry
public DaoRegistry()Constructor -
DaoRegistry
Constructor
-
-
Method Details
-
setSupportedResourceTypes
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext theApplicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getSystemDao
-
getResourceDao
- Throws:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException- If the given resource type is not supported
-
getResourceDao
public <R extends org.hl7.fhir.instance.model.api.IBaseResource> IFhirResourceDao<R> getResourceDao(Class<R> theResourceType) -
getResourceDaoIfExists
@Deprecated public <T extends org.hl7.fhir.instance.model.api.IBaseResource> IFhirResourceDao<T> getResourceDaoIfExists(Class<T> theResourceType)Deprecated.Use getResourceDaoOrNull -
getResourceDaoOrNull
@Nullable public <T extends org.hl7.fhir.instance.model.api.IBaseResource> IFhirResourceDao<T> getResourceDaoOrNull(Class<T> theResourceType) -
getResourceDaoIfExists
@Deprecated public <T extends org.hl7.fhir.instance.model.api.IBaseResource> IFhirResourceDao<T> getResourceDaoIfExists(String theResourceType)Deprecated.Use getResourceDaoOrNull -
getResourceDaoOrNull
@Nullable public <T extends org.hl7.fhir.instance.model.api.IBaseResource> IFhirResourceDao<T> getResourceDaoOrNull(String theResourceName) -
isResourceTypeSupported
- Specified by:
isResourceTypeSupportedin interfaceIDaoRegistry
-
register
-
getDaoOrThrowException
public IFhirResourceDao getDaoOrThrowException(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theClass) -
setResourceDaos
-
getSubscriptionDao
-
setSupportedResourceTypes
-
getRegisteredDaoTypes
-