Package org.opencds.cqf.cql.engine.model
Class BaseModelResolver
- java.lang.Object
-
- org.opencds.cqf.cql.engine.model.BaseModelResolver
-
- All Implemented Interfaces:
ModelResolver
- Direct Known Subclasses:
SystemDataProvider
public abstract class BaseModelResolver extends java.lang.Object implements ModelResolver
-
-
Constructor Summary
Constructors Constructor Description BaseModelResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectas(java.lang.Object value, java.lang.Class<?> type, boolean isStrict)Cast the specified value to the specified type.java.lang.Booleanis(java.lang.Object value, java.lang.Class<?> type)Check whether or not a specified value instance is of the specified type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opencds.cqf.cql.engine.model.ModelResolver
createInstance, getContextPath, getPackageName, getPackageNames, objectEqual, objectEquivalent, resolvePath, resolveType, resolveType, setPackageName, setPackageNames, setValue
-
-
-
-
Method Detail
-
is
public java.lang.Boolean is(java.lang.Object value, java.lang.Class<?> type)Description copied from interface:ModelResolverCheck whether or not a specified value instance is of the specified type.- Specified by:
isin interfaceModelResolver- Returns:
- true when the value is of the specified type, otherwise false.
-
as
public java.lang.Object as(java.lang.Object value, java.lang.Class<?> type, boolean isStrict)Description copied from interface:ModelResolverCast the specified value to the specified type. When type conversion is not possible, null should be returned unless the isStrict flag is set to true wherein an Exception will be thrown.- Specified by:
asin interfaceModelResolver- Parameters:
value- model object instancetype- type to which the value should be caseisStrict- flag indicating how to handle invalid type conversion- Returns:
- the result of the value conversion or null if conversion is not possible.
-
-