Package ca.uhn.fhir.jpa.cache
Class ResourceTypeCacheSvcImpl
java.lang.Object
ca.uhn.fhir.jpa.cache.ResourceTypeCacheSvcImpl
- All Implemented Interfaces:
IResourceTypeCacheSvc
-
Constructor Summary
ConstructorsConstructorDescriptionResourceTypeCacheSvcImpl(IHapiTransactionService theTransactionService, IResourceTypeDao theResourceTypeDao, MemoryCacheService theMemoryCacheService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCache(String theResType, Short theResTypeId) Adds the given resource type and its corresponding ID to the cache.protected ResourceTypeEntitycreateResourceType(String theResourceType) shortgetResourceTypeId(String theResType) Retrieves the resource type ID for the given resource type.protected voidvoidstart()
-
Constructor Details
-
ResourceTypeCacheSvcImpl
public ResourceTypeCacheSvcImpl(IHapiTransactionService theTransactionService, IResourceTypeDao theResourceTypeDao, MemoryCacheService theMemoryCacheService)
-
-
Method Details
-
start
-
getResourceTypeId
Description copied from interface:IResourceTypeCacheSvcRetrieves the resource type ID for the given resource type. If the resource type does not exist, a new custom resource type will be created, added to the database and cache, and its ID will be returned.- Specified by:
getResourceTypeIdin interfaceIResourceTypeCacheSvc- Parameters:
theResType- the resource type to retrieve or create- Returns:
- the resource type ID or throws an exception if the resource creation fails
-
addToCache
Description copied from interface:IResourceTypeCacheSvcAdds the given resource type and its corresponding ID to the cache.- Specified by:
addToCachein interfaceIResourceTypeCacheSvc- Parameters:
theResType- the resource type to be added to the cachetheResTypeId- the ID of the resource type to be added to the cache
-
initResourceTypes
-
createResourceType
-