Class CacheAwareModelManager
- java.lang.Object
-
- org.cqframework.cql.cql2elm.ModelManager
-
- org.opencds.cqf.cql.evaluator.cql2elm.model.CacheAwareModelManager
-
public class CacheAwareModelManager extends org.cqframework.cql.cql2elm.ModelManagerThis class extends the CQL translatorModelManagerclass to be aware of a global cache ofModels 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 Summary
Constructors Constructor Description CacheAwareModelManager(Map<org.hl7.elm.r1.VersionedIdentifier,org.cqframework.cql.cql2elm.model.Model> globalCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.cqframework.cql.cql2elm.model.ModelresolveModel(org.hl7.elm.r1.VersionedIdentifier modelIdentifier)
-
-
-
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:
resolveModelin classorg.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
-
-