Click or drag to resize

UnresolvedFilterExpression Class

Represents an expression that can be evaluated against a (data)object resulting in true/false.
Inheritance Hierarchy
SystemObject
  Omada.OE.ModelUnresolvedFilterExpression

Namespace:  Omada.OE.Model
Assembly:  Omada.OE.Model (in Omada.OE.Model.dll) Version: 15.0.0.0
Syntax
C#
[SerializableAttribute]
public class UnresolvedFilterExpression : IUnresolvedFilterExpression

The UnresolvedFilterExpression type exposes the following members.

Constructors
  NameDescription
Public methodUnresolvedFilterExpression(UnresolvedFilterExpression, Object)
Creates a validated or converted filter expression based on an existing one. The filterValue is replaced.
Public methodUnresolvedFilterExpression(String, ExpInnerOperator, Boolean, String)
Constructs an UNRESOLVED expression with a property, operator and value.
Public methodUnresolvedFilterExpression(String, ExpInnerOperator, IEnumerableGuid, String)
Constructs an UNRESOLVED expression with a property, operator and value. Use for a Set- or Reference-property.
Public methodUnresolvedFilterExpression(String, ExpInnerOperator, IEnumerableInt32, String)
Constructs an UNRESOLVED expression with a property, operator and value. Use for a Set- or Reference-property.
Public methodUnresolvedFilterExpression(String, ExpInnerOperator, DateTime, String)
Constructs an UNRESOLVED expression with a property, operator and value.
Public methodUnresolvedFilterExpression(String, ExpInnerOperator, Double, String)
Constructs an UNRESOLVED expression with a property, operator and value.
Public methodUnresolvedFilterExpression(String, ExpInnerOperator, Guid, String)
Constructs an UNRESOLVED expression with a property, operator and value. Use for a Set- or Reference-property.
Public methodUnresolvedFilterExpression(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.
Public methodUnresolvedFilterExpression(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)
Public methodUnresolvedFilterExpression(String, ExpInnerOperator, TimeSpan, String)
Constructs an UNRESOLVED expression with a property, operator and value.
Public methodUnresolvedFilterExpression(BaseProperty, ExpInnerOperator, Object, String)
Creates a validated or converted filter expression.
Public methodUnresolvedFilterExpression(FixedField, ExpInnerOperator, Object, String)
Creates a validated or converted filter expression.
Top
Properties
  NameDescription
Public propertyExpressionState
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.
Public propertyFilterValue
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> }

Public propertyIsResolved
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
Public propertyIsResolvedExpressionForDataObjectReferenceField
Is expression resolved and for either a reference property or a dataobject-referencing fixed field?
Public propertyIsResolvedExpressionForProperty
Has the expression been resolved/validated and is the "left side" a property? (and not a fixed field)
Public propertyOperator
Expression inner operator
Public propertyPath
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 }

Public propertyProperty
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
Public propertyPropertyType
Can only be accessed if IsResolvedExpressionForProperty is true.
Top
Methods
  NameDescription
Public methodStatic memberConvertFilterValue(BaseProperty, String) Obsolete.
Converts a filter value in string format to an appropriate data type.
Public methodStatic memberConvertFilterValue(FixedField, String) Obsolete.
Converts a filter value in string format to an appropriate data type.
Public methodStatic memberConvertFilterValue(BaseProperty, String, String)
Converts a filter value in string format to an appropriate data type.
Public methodStatic memberConvertFilterValue(FixedField, String, String)
Converts a filter value in string format to an appropriate data type.
Public methodEvaluateExpression(PropertyValuesContainer)
Evaluates the expression against an "object" with a set of property values. Returns true if the expression evaluates to true.
Public methodStatic memberEvaluateExpression(UnresolvedFilterExpression, PropertyValuesContainer)
Evaluates an expression against an "object" with a set of property values. Returns true if the expression evaluates to true.
Public methodStatic memberGetAllowedExpressionValueDataTypes(BaseProperty, ListExpInnerOperator)
Returns the allowed (legal) data types for the filter value of an expression. Also, the allowed (legal) operators are returned as well.
Public methodStatic memberGetAllowedExpressionValueDataTypes(FixedField, ListExpInnerOperator)
Returns the allowed (legal) data types for the filter value of an expression. Also, the allowed (legal) operators are returned as well.
Public methodStatic memberGetAllowedOperators
Public methodStatic memberGetFixedFieldInfo
Public methodStatic memberGetProperties
Returns a distinct list of the names of the properties and fixed fields that are used in a collection of filter expressions.
Public methodNegateOperator
Public methodStatic memberNegateOperator(ExpInnerOperator)
Public methodToString
Returns a string representation of the object
(Overrides ObjectToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBool
Converts object to boolean.
(Defined by ObjectExtensions.)
Public Extension MethodToDateTime
Converts object to DateTime.
(Defined by ObjectExtensions.)
Public Extension MethodToInt
Converts object to integer.
(Defined by ObjectExtensions.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate propertyIUnresolvedFilterExpressionFilterValue
Comparison value. Can be null.
Explicit interface implementationPrivate propertyIUnresolvedFilterExpressionOperator
Operator applied in the filter expression. The set of legal operators depends on "Property".
Explicit interface implementationPrivate propertyIUnresolvedFilterExpressionPath
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 }

Explicit interface implementationPrivate propertyIUnresolvedFilterExpressionProperty
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 .
Top
See Also