Interface IExpr
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ExpressionR7
Interface for objects representing a (parsed) expression.
- Since:
- 5.0
- Author:
- O. Kerpershoek, F. van der Meer
-
Method Summary
Modifier and TypeMethodDescriptionevaluate
(IValueSource source) This method will evaluate the expression for the context (source) provided.This method will return the original expression string from which the expression was parsed.This method will return the data type of the result.String[]
Returns the root variables which are used from the profile.Returns the type name of the result type.boolean
This method will return a boolean indicating if the result of an evaluation of the expression may contain multiple values.
-
Method Details
-
getResultType
DataType getResultType()This method will return the data type of the result.- Returns:
- the data type of the result.
-
isMultivalue
boolean isMultivalue()This method will return a boolean indicating if the result of an evaluation of the expression may contain multiple values. Expression which can result in multiple values, will always return a list value as result.- Returns:
- Boolean indicating if the result can consist of multiple values.
-
getTypeName
String getTypeName()Returns the type name of the result type. This type can either be the entity's name or the domain's name, or null when the value isn't bound to a specific type.- Returns:
- the type name of the result type.
-
getExpression
String getExpression()This method will return the original expression string from which the expression was parsed.- Returns:
- The original expression string.
-
evaluate
This method will evaluate the expression for the context (source) provided.
Note: This method might return a null value indicating the result of the expression is unknown. IF a THEN b<null value unexpected> ELSE c- Parameters:
source
- Object containing context information that should be used during evaluation.- Returns:
- The result of the expression.
- Throws:
ExpressionException
- This exception is thrown when the expression could not be evaluated.
-
getScopeObjects
String[] getScopeObjects()Returns the root variables which are used from the profile. When the expression does not use any scoped objects, this method will return an empty array.- Returns:
- Array containing the names of the objects that need to be in scope.
-