Utilities to handle Operators and conditions.
Node | Description |
---|
Method | Description |
---|---|
sap.ui.mdc.condition.FilterOperatorUtil.addOperator |
Adds an operator to the list of known operators. |
sap.ui.mdc.condition.FilterOperatorUtil.addOperatorForType |
Adds an operator to the list of valid operators for a type. |
sap.ui.mdc.condition.FilterOperatorUtil.addOperators |
Adds an array of operators to the list of known operators. |
sap.ui.mdc.condition.FilterOperatorUtil.checkConditionsEmpty |
Checks if conditions are empty. Modifies the |
sap.ui.mdc.condition.FilterOperatorUtil.checkConditionValidated |
Checks if a condition is validated and sets the For EQ set |
sap.ui.mdc.condition.FilterOperatorUtil.compareConditions |
Compares two conditions. For EQ conditions, only the key part of the values is compared as the text part might be different (if the translation is missing, for example). |
sap.ui.mdc.condition.FilterOperatorUtil.compareConditionsArray |
Compares two arrays of conditions For EQ conditions only the key part of the values is compared as the text part might be different (translation missing...) |
sap.ui.mdc.condition.FilterOperatorUtil.getDefaultOperator |
Returns the default operator for the given basic type. |
sap.ui.mdc.condition.FilterOperatorUtil.getEQOperator |
Returns the "equal to" (EQ) operator object. If an array of operators is given, and an EQ-like operator exists there, this is returned. Otherwise the EQ operator is returned. This is required for Field. |
sap.ui.mdc.condition.FilterOperatorUtil.getMatchingOperators |
Returns the possible operators for the given value from the given array of operators. Note The value must be valid for the current type as this function only checks the operator against values. No type check is performed. |
sap.ui.mdc.condition.FilterOperatorUtil.getOperator |
Returns the operator object for the given operator name. |
sap.ui.mdc.condition.FilterOperatorUtil.getOperatorsForType |
Returns all available default operators for the given type. |
sap.ui.mdc.condition.FilterOperatorUtil.indexOfCondition |
Returns the index of a condition in an array of conditions. For EQ conditions, only the key part of the values is compared as the text part might be different (if the translation is missing, for example). Note: If two or more identical conditions are in the array, the index is the first one is used. |
sap.ui.mdc.condition.FilterOperatorUtil.insertOperatorForType |
Inserts an operator into the list of valid operators for a type. |
sap.ui.mdc.condition.FilterOperatorUtil.onlyEQ |
Checks if only EQ is supported. (Field case) |
sap.ui.mdc.condition.FilterOperatorUtil.removeOperator |
Removes an operator from the list of known operators. |
sap.ui.mdc.condition.FilterOperatorUtil.removeOperatorForType |
Removes an operator from the list of valid operators for a type. |
sap.ui.mdc.condition.FilterOperatorUtil.removeOperators |
Removes all given operators from the list of known operators. |
sap.ui.mdc.condition.FilterOperatorUtil.setDefaultOperatorForType |
Sets the default operator for the list of operators for a type. |
sap.ui.mdc.condition.FilterOperatorUtil.setOperatorsForType |
Adds operators to the list of valid operators for a type. |
sap.ui.mdc.condition.FilterOperatorUtil.updateConditionsValues |
Updates the value range to have the correct number of entries for an array of conditions |
sap.ui.mdc.condition.FilterOperatorUtil.updateConditionValues |
Updates the value range to have the right number of entries for one condition. |
Adds an operator to the list of known operators.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOperator | sap.ui.mdc.condition.Operator |
Operator |
Adds an operator to the list of valid operators for a type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.mdc.enum.BaseType |
Basic type |
|
vOperator | sap.ui.mdc.condition.Operator string |
The operator instance or operator name |
Adds an array of operators to the list of known operators.
Param | Type | DefaultValue | Description |
---|---|---|---|
aOperators | sap.ui.mdc.condition.Operator[] |
Array of operators |
Checks if conditions are empty.
Modifies the isEmpty
parameter of the conditions.
Param | Type | DefaultValue | Description |
---|---|---|---|
aConditions | sap.ui.mdc.condition.ConditionObject[] |
Conditions |
Checks if a condition is validated and sets the validated
property.
For EQ set validated
flag if a description is given.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition | sap.ui.mdc.condition.ConditionObject |
Condition to check |
Compares two conditions.
For EQ conditions, only the key part of the values is compared as the text part might be different (if the translation is missing, for example).
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition1 | sap.ui.mdc.condition.ConditionObject |
Condition to check |
|
oCondition2 | sap.ui.mdc.condition.ConditionObject |
Condition to check |
Compares two arrays of conditions
For EQ conditions only the key part of the values is compared as the text part might be different (translation missing...)
Param | Type | DefaultValue | Description |
---|---|---|---|
aConditions1 | sap.ui.mdc.condition.ConditionObject[] |
Conditions to check |
|
aConditions2 | sap.ui.mdc.condition.ConditionObject[] |
Conditions to check |
Returns the default operator for the given basic type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.mdc.enum.BaseType |
Basic type |
Returns the "equal to" (EQ) operator object.
If an array of operators is given, and an EQ-like operator exists there, this is returned. Otherwise the EQ operator is returned.
This is required for Field.
Param | Type | DefaultValue | Description |
---|---|---|---|
aOperators | string[] |
Array with the supported filter operators |
Returns the possible operators for the given value from the given array of operators.
Note The value must be valid for the current type as this function only checks the operator against values. No type check is performed.
Param | Type | DefaultValue | Description |
---|---|---|---|
aOperators | string[] |
List of all supported operator names |
|
sValue | string |
Value entered (including operator) |
Returns the operator object for the given operator name.
Param | Type | DefaultValue | Description |
---|---|---|---|
sOperator | string |
Name of the operator |
Returns all available default operators for the given type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.mdc.enum.BaseType |
Basic type |
Returns the index of a condition in an array of conditions.
For EQ conditions, only the key part of the values is compared as the text part might be different (if the translation is missing, for example).
Note: If two or more identical conditions are in the array, the index is the first one is used.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition | sap.ui.mdc.condition.ConditionObject |
Condition to check |
|
aConditions | sap.ui.mdc.condition.ConditionObject[] |
Array of conditions |
Inserts an operator into the list of valid operators for a type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.mdc.enum.BaseType |
Basic type |
|
vOperator | sap.ui.mdc.condition.Operator string |
The operator instance or operator name |
|
idx | int |
Index of the operator in the list of operators for this type |
Checks if only EQ is supported. (Field case)
Param | Type | DefaultValue | Description |
---|---|---|---|
aOperators | string[] |
Array with the supported filter operators |
Removes an operator from the list of known operators.
Param | Type | DefaultValue | Description |
---|---|---|---|
vOperator | sap.ui.mdc.condition.Operator string |
The operator instance or operator name |
Removes an operator from the list of valid operators for a type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.mdc.enum.BaseType |
Basic type |
|
vOperator | sap.ui.mdc.condition.Operator string |
The operator instance or operator name |
Removes all given operators from the list of known operators.
Param | Type | DefaultValue | Description |
---|---|---|---|
aOperators | sap.ui.mdc.condition.Operator[] |
Array of operators Note: |
Sets the default operator for the list of operators for a type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.mdc.enum.BaseType |
Basic type |
|
vDefaultOperator | sap.ui.mdc.condition.Operator string |
The default operator instance or default operator name Note: |
Adds operators to the list of valid operators for a type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.mdc.enum.BaseType |
Basic type |
|
aOperators | sap.ui.mdc.condition.Operator[] |
Operators |
|
vDefaultOperator | sap.ui.mdc.condition.Operator string |
The default operator instance or default operator name Note: |
Updates the value range to have the correct number of entries for an array of conditions
Param | Type | DefaultValue | Description |
---|---|---|---|
aConditions | sap.ui.mdc.condition.ConditionObject[] |
Conditions |
Updates the value range to have the right number of entries for one condition.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition | sap.ui.mdc.condition.ConditionObject |
Condition |