Creates an sap.ui.mdc.condition.Operator
object. This is used in the FilterField control to define which filter operators are supported.
If a function or property is initial, the default implementation is used.
new sap.ui.mdc.condition.Operator(oConfiguration)
Param | Type | Default Value | Description |
---|---|---|---|
oConfiguration | object | Properties of the operator |
|
name | string | Name of the operator used in the condition |
|
filterOperator | string | The operator's default filter operator that is created as defined in FilterOperator |
|
tokenParse | string | The string representation of the regular expression that is used by the operator to parse a value to eliminate the operator and get the data string. A placeholder that refers to the translated tokenText can be used. |
|
tokenFormat | string | The string representation that is used by the operator to format a value into an output string. For the value placeholder |
|
valueTypes | string[] object[] | Array of type to be used. The length of the array defines the number of values that need to be entered with the operator. |
|
paramTypes? | string[] | Array of type parameters regexp |
|
longText? | string | String representation of the operator as a long text. |
|
tokenText? | string | String representation of the operator as a short text. |
|
displayFormats? | object | Pattern how different displayFormats are rendered |
|
format? | function | Function to format condition |
|
parse? | function | Function to parse input into condition |
|
validate? | function | Function to validate condition |
|
getModelFilter? | function | Function create filter for a condition |
|
isEmpty? | function | Function to check if condition is empty |
|
createControl? | function | Function to create a control to be used in DefineConditionPanel |
|
getCheckValue? | function | Function to get the value for condition compare |
|
getValues? | function | Function to get the real values without operator symbol |
|
checkValidated? | function | Function to check if a condition is validated (sets the |
|
exclude? | boolean | If set, the operator is handled as exclude filter when creating the filters of all conditions |
|
validateInput? | boolean | If set, the user input for this operator needs to be validated using a field help |
|
additionalInfo? | string | additionalInfo text for the operator. Will be shown in the operator suggest as second column. If not used (undefined) the Include or Exclude information of the operator is used. |
Method | Description |
---|---|
_createLocalType |
Creates a local type. |
_parseValue |
Parses a text based on the data type. |
checkValidated |
Checks if a condition is validated and sets the For EQ set |
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.Operator.extend |
Creates a new subclass of class sap.ui.mdc.condition.Operator with name
|
format |
Formats a condition. |
getCondition |
Creates a condition for a given text. |
sap.ui.mdc.condition.Operator.getMetadata |
Returns a metadata object for class sap.ui.mdc.condition.Operator. |
getModelFilter |
Creates a filter object for a condition. |
getTypeText |
Gets the text for an operator name. |
getValues |
Returns the real values without operator symbol. In this function no type validation takes place. |
isEmpty |
Checks if a condition is empty. |
isSingleValue |
Checks if an For example, an equal Operator has only one value, a between operator two. |
parse |
Parses a text. |
test |
Checks if a text is suitable for an operator. |
validate |
Validates a value. |
Creates a local type.
Param | Type | DefaultValue | Description |
---|---|---|---|
vType | string object |
Type name or object with type information |
|
oType | sap.ui.model.Type |
original data type |
Parses a text based on the data type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | string |
Text |
|
oType | sap.ui.model.Type |
Data type |
Checks if a condition is validated and sets the validated
flag.
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 |
Creates a new subclass of class sap.ui.mdc.condition.Operator with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.base.Object.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Formats a condition.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition | sap.ui.mdc.condition.ConditionObject |
Condition |
|
oType | sap.ui.model.Type |
Data type |
|
sDisplay | string |
Display mode |
|
bHideOperator | boolean | false |
If set, only the value output is returned without any visible operator |
Creates a condition for a given text.
Param | Type | DefaultValue | Description |
---|---|---|---|
sText | string |
Text |
|
oType | sap.ui.model.Type |
Data type |
|
sDisplayFormat | sap.ui.mdc.enum.FieldDisplay |
Display format |
|
bDefaultOperator | boolean |
If true, operator is used as default. In this case parsing without operator also works |
Returns a metadata object for class sap.ui.mdc.condition.Operator.
Creates a filter object for a condition.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition | sap.ui.mdc.condition.ConditionObject |
Condition |
|
sFieldPath | string |
Path of filter |
|
oType | sap.ui.model.Type |
Data type of the used filter field |
|
bCaseSensitive | boolean |
creates a caseSensitive filter |
Gets the text for an operator name.
Param | Type | DefaultValue | Description |
---|---|---|---|
sKey | string |
Text key |
|
sType | string |
Name of type |
Returns the real values without operator symbol.
In this function no type validation takes place.
Param | Type | DefaultValue | Description |
---|---|---|---|
sText | string |
Text |
|
sDisplayFormat | sap.ui.mdc.enum.FieldDisplay |
Display format |
|
bDefaultOperator | boolean |
If true, operator is used as default. In this case parsing without operator also works |
Checks if a condition is empty.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition | sap.ui.mdc.condition.ConditionObject |
Condition |
|
oType | sap.ui.model.Type |
Data type |
Checks if an Operator
contains only one value or not.
For example, an equal Operator has only one value, a between operator two.
Parses a text.
Param | Type | DefaultValue | Description |
---|---|---|---|
sText | string |
Text |
|
oType | sap.ui.model.Type |
Data type |
|
sDisplayFormat | sap.ui.mdc.enum.FieldDisplay |
Display format |
|
bDefaultOperator | boolean |
If true, operator is used as default. In this case parsing without operator also works |
Checks if a text is suitable for an operator.
Param | Type | DefaultValue | Description |
---|---|---|---|
sText | string |
Text |
Validates a value.
Param | Type | DefaultValue | Description |
---|---|---|---|
aValues | any |
Values |
|
oType | sap.ui.model.Type |
Data type |