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
ConstructorDescriptionConstructorDaoRegistry
(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) <R extends org.hl7.fhir.instance.model.api.IBaseResource>
IFhirResourceDao<R> getResourceDao
(R theResource) <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) boolean
isResourceTypeSupported
(String theResourceType) void
register
(IFhirResourceDao theResourceDao) void
setApplicationContext
(org.springframework.context.ApplicationContext theApplicationContext) void
setResourceDaos
(Collection<IFhirResourceDao> theResourceDaos) void
setSupportedResourceTypes
(String... theResourceTypes) void
setSupportedResourceTypes
(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:
setApplicationContext
in 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(R theResource) -
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:
isResourceTypeSupported
in interfaceIDaoRegistry
-
register
-
getDaoOrThrowException
public IFhirResourceDao getDaoOrThrowException(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theClass) -
setResourceDaos
-
getSubscriptionDao
-
setSupportedResourceTypes
-
getRegisteredDaoTypes
-