Class CacheAwareModelManager


  • public class CacheAwareModelManager
    extends org.cqframework.cql.cql2elm.ModelManager
    This class extends the CQL translator ModelManager class to be aware of a global cache of Models The global cache is by @{org.hl7.elm.r1.VersionedIdentifier}, while the local cache is by name. This is because the translator expects the ModelManager to only permit loading of a single version version of a given Model in a single translation context, while the global cache is for all versions of Models
    • Constructor Detail

      • CacheAwareModelManager

        public CacheAwareModelManager​(Map<org.hl7.elm.r1.VersionedIdentifier,​org.cqframework.cql.cql2elm.model.Model> globalCache)
        Parameters:
        globalCache - cache for Models by VersionedIdentifier. Expected to be thread-safe.
    • Method Detail

      • resolveModel

        public org.cqframework.cql.cql2elm.model.Model resolveModel​(org.hl7.elm.r1.VersionedIdentifier modelIdentifier)
        Overrides:
        resolveModel in class org.cqframework.cql.cql2elm.ModelManager
        Parameters:
        modelIdentifier - the identifer of the model to resolve
        Returns:
        the model
        Throws:
        IllegalArgumentException - if an attempt to resolve multiple versions of the same model is made