UnresolvedFilterExpression Class |
Namespace: Omada.OE.Model
[SerializableAttribute] public class UnresolvedFilterExpression : IUnresolvedFilterExpression
The UnresolvedFilterExpression type exposes the following members.
Name | Description | |
---|---|---|
![]() | UnresolvedFilterExpression(UnresolvedFilterExpression, Object) |
Creates a validated or converted filter expression based on an existing one. The filterValue is replaced.
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, Boolean, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, IEnumerableGuid, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
Use for a Set- or Reference-property.
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, IEnumerableInt32, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
Use for a Set- or Reference-property.
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, DateTime, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, Double, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, Guid, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
Use for a Set- or Reference-property.
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, Int32, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
Use for a Set-, Reference- or Value-property of data type Integer.
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, String, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
The constructor is used when the filter value is a supposed to be a string (like when the filter is for a value property w. datatype text).
It can, however, also be used when the property/fixedfield expects something that is not a string.
In the latter case the UnresolvedFilterExpressionHandler attempts to convert it to a proper data type.
Examples: "If property/fixedfield expects a xyz : then we allow this format":
- string : "some string"
- datetime : xml datetime format (check the XmlConvert class)
- bool : ["true", "false"]
- int : "12345"
- IEnumerable[int] : "123,456,789"
- Guid : "B8C6F2D1-079E-4039-A5B1-369F423AE4C8"
- IEnumerable[Guid] : "B8C6F2D1-079E-4039-A5B1-369F423AE4C8,56079274-BFB5-421E-A72E-E63597B72CD6"
- IEnumerable[string]: """setpropvalue a"",""setpropvalue b""" (csv format)
|
![]() | UnresolvedFilterExpression(String, ExpInnerOperator, TimeSpan, String) |
Constructs an UNRESOLVED expression with a property, operator and value.
|
![]() | UnresolvedFilterExpression(BaseProperty, ExpInnerOperator, Object, String) |
Creates a validated or converted filter expression.
|
![]() | UnresolvedFilterExpression(FixedField, ExpInnerOperator, Object, String) |
Creates a validated or converted filter expression.
|
Name | Description | |
---|---|---|
![]() | ExpressionState |
A filter expression can be in one of three states:
- Unresolved: We don't know for sure that the property/field exists, the operator may be invalid and the filter value may be of a wrong data type.
- Validated: Property/field has been validated and the operator has been validated according to the property/field.
The filter value data type has been validated according to the property/field.
- Converted: Same as Validated. Additionally the filter value can't contain Guid ids.
|
![]() | FilterValue |
If the ExpressionState is UNRESOLVED then the data type one of the following:
>
string, int, DateTime, IEnumerable<int>, IEnumerable<Guid>, bool or Guid
If the ExpressionState is VALIDATED then the data type is ensured to be valid corresponding to the following table: > Value property - Text : { string } Value property - Integer : { int } Value property - DateTime : { DateTime } Value property - Boolean : { bool } Set property : { int, IEnumerable<int>, Guid, IEnumerable<Guid> } Reference property : { int, IEnumerable<int>, Guid, IEnumerable<Guid> } DateTime fixed field : { DateTime } Integer fixed field : { int, IEnumerable<int> } Id-reference fixed field : { int, IEnumerable<int>, Guid, IEnumerable<Guid> } String fixed field : { string } Boolean fixed field : { bool } Enum fixed field : { int, IEnumerable<int> } If the ExpressionState is CONVERTED then the data type is ensured to be valid corresponding to the following table: > Value property - Text : { string } Value property - Integer : { int } Value property - DateTime : { DateTime } Value property - Boolean : { bool } Set property : { int, IEnumerable<int> } Reference property : { int, IEnumerable<int> } DateTime fixed field : { DateTime } Integer fixed field : { int, IEnumerable<int> } Id-reference fixed field : { int, IEnumerable<int> } String fixed field : { string } Boolean fixed field : { bool } Enum fixed field : { int, IEnumerable<int> } |
![]() | IsResolved |
Has the expression been resolved/validated?
If so we know that:
- the operator is legal to be used on the expression property
- the filter value has a legal data type for comparing with a value for the expression property
|
![]() | IsResolvedExpressionForDataObjectReferenceField |
Is expression resolved and for either a reference property or a dataobject-referencing fixed field?
|
![]() | IsResolvedExpressionForProperty |
Has the expression been resolved/validated and is the "left side" a property? (and not a fixed field)
|
![]() | Operator |
Expression inner operator
|
![]() | Path |
Reference path that expresses the data objects that the filter expression must filter on.
If a path is stated then reference property value(s) must exist that meet the requirements of the path and left/operator/right expression in order to evaluate to true.
Can be null - in which case the expression is evaluated directly on the object to which it is applied.
If a path is stated then the evaluator finds the result of the path using the object (which the expression is evaluated against) as starting point. It then evaluates the left/operator/right expression on the result of the path expression. For example, if we're applying an expression on resource assignment data objects, and we only want those where the assigned resource belongs to a specific system, we could add the following expression: Path: /ROLEREF/SYSTEMREF Property: ID Operator: Equals FilterValue: { id of a specific system } |
![]() | Property |
System name of the property or FixedField being filtered on.
Case-insensitive.
The following fixed fields are supported:
CreateTime, CreatedBy, ChangeTime, ChangedBy, Number, Type, UserName, Id, ActivityState, ProcessState, Template, Inactive, DisplayName
|
![]() | PropertyType |
Can only be accessed if IsResolvedExpressionForProperty is true.
|
Name | Description | |
---|---|---|
![]() ![]() | ConvertFilterValue(BaseProperty, String) | Obsolete.
Converts a filter value in string format to an appropriate data type.
|
![]() ![]() | ConvertFilterValue(FixedField, String) | Obsolete.
Converts a filter value in string format to an appropriate data type.
|
![]() ![]() | ConvertFilterValue(BaseProperty, String, String) |
Converts a filter value in string format to an appropriate data type.
|
![]() ![]() | ConvertFilterValue(FixedField, String, String) |
Converts a filter value in string format to an appropriate data type.
|
![]() | EvaluateExpression(PropertyValuesContainer) |
Evaluates the expression against an "object" with a set of property values.
Returns true if the expression evaluates to true.
|
![]() ![]() | EvaluateExpression(UnresolvedFilterExpression, PropertyValuesContainer) |
Evaluates an expression against an "object" with a set of property values.
Returns true if the expression evaluates to true.
|
![]() ![]() | GetAllowedExpressionValueDataTypes(BaseProperty, ListExpInnerOperator) |
Returns the allowed (legal) data types for the filter value of an expression.
Also, the allowed (legal) operators are returned as well.
|
![]() ![]() | GetAllowedExpressionValueDataTypes(FixedField, ListExpInnerOperator) |
Returns the allowed (legal) data types for the filter value of an expression.
Also, the allowed (legal) operators are returned as well.
|
![]() ![]() | GetAllowedOperators | |
![]() ![]() | GetFixedFieldInfo | |
![]() ![]() | GetProperties |
Returns a distinct list of the names of the properties and fixed fields that are used in a collection of filter expressions.
|
![]() | NegateOperator | |
![]() ![]() | NegateOperator(ExpInnerOperator) | |
![]() | ToString |
Returns a string representation of the object
(Overrides ObjectToString.) |
Name | Description | |
---|---|---|
![]() | ToBool |
Converts object to boolean.
(Defined by ObjectExtensions.) |
![]() | ToDateTime |
Converts object to DateTime.
(Defined by ObjectExtensions.) |
![]() | ToInt |
Converts object to integer.
(Defined by ObjectExtensions.) |
Name | Description | |
---|---|---|
![]() ![]() | IUnresolvedFilterExpressionFilterValue |
Comparison value.
Can be null.
|
![]() ![]() | IUnresolvedFilterExpressionOperator |
Operator applied in the filter expression.
The set of legal operators depends on "Property".
|
![]() ![]() | IUnresolvedFilterExpressionPath |
Reference path that expresses the data objects that the filter expression must filter on.
If a reference path is stated then reference property value(s) must exist that meet the requirements of the path and left/operator/right expression.
Can be null - in which case the filter expression filters directly on the data objects that are being loaded.
The path is applied to the data objects that are being loaded. For example, if we're loading resource assignment data objects, and we only want those where the assigned resource belongs to a specific system, we could add the following expression: Path: /ROLEREF/SYSTEMREF Property: ID Operator: Equals FilterValue: { id of a specific system } |
![]() ![]() | IUnresolvedFilterExpressionProperty |
System name of the property being filtered on.
Case-insensitive.
Can also denote the fixed field "Type".
An unresolved expression for "Type" is, however, not resolved into a filter expression.
Instead it is resolved and assigned to DataObjectFilter.TypeIds .
|