Package ca.uhn.fhir.jpa.cache
Interface IResourceTypeCacheSvc
- All Known Implementing Classes:
ResourceTypeCacheSvcImpl
public interface IResourceTypeCacheSvc
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCache(String theResType, Short theResTypeId) Adds the given resource type and its corresponding ID to the cache.shortgetResourceTypeId(String theResType) Retrieves the resource type ID for the given resource type.
-
Method Details
-
getResourceTypeId
Retrieves 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.- Parameters:
theResType- the resource type to retrieve or create- Returns:
- the resource type ID or throws an exception if the resource creation fails
-
addToCache
Adds the given resource type and its corresponding ID to the cache.- Parameters:
theResType- the resource type to be added to the cachetheResTypeId- the ID of the resource type to be added to the cache
-