class sap.ui.mdc.condition.ConditionModel

Visiblity: restricted
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/mdc/condition/ConditionModel
Application Component: CA-UI5-MDC

JSON based Model for FilterField controls. The model stores the entered values as ConditionObjects.


Constructor

new sap.ui.mdc.condition.ConditionModel()

Methods Overview

Method Description
addCondition

Adds a condition for a specified FieldPath.

clone

creates a clone of the ConditionModel which contains the conditions for the sFieldPath parameter

createCondition

creates a condition instance

Since use the sap.ui.mdc.condition.Condition.createCondition
createItemCondition

creates a condition instance for the item-condition

Since use the sap.ui.mdc.condition.Condition.createItemCondition
sap.ui.mdc.condition.ConditionModel.extend

Creates a new subclass of class sap.ui.mdc.condition.ConditionModel 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.model.json.JSONModel.extend.

getAllConditions

Returns all conditions.

getConditions

Returns conditions for a specified .

sap.ui.mdc.condition.ConditionModel.getMetadata

Returns a metadata object for class sap.ui.mdc.condition.ConditionModel.

indexOf

Determines the index of a condition for a specified FieldPath.

insertCondition

Inserts a condition for a specified FieldPath.

merge

merge conditions from the source ConditionModel into this instance

removeAllConditions

Removes all conditions for a specified FieldPath.

removeCondition

Removes a condition for a specified FieldPath.

setConditions

Sets conditions. All already existing conditions will be removed.

addCondition

Adds a condition for a specified FieldPath.

Param Type DefaultValue Description
sFieldPath string

fieldPath of the condition

oCondition sap.ui.mdc.condition.ConditionObject

condition to be added

bForce boolean

if set the condition will be added even if it already exist

clone

creates a clone of the ConditionModel which contains the conditions for the sFieldPath parameter

Param Type DefaultValue Description
sFieldPath string

specifies which conditions should be copied into the clone. If not specified all conditions will be copied.

createCondition

creates a condition instance

Since use the sap.ui.mdc.condition.Condition.createCondition
Param Type DefaultValue Description
sFieldPath string

the FieldPath name of the condition

sOperator string

the operator for the condition

aValues any[]

the array of values for the condition

createItemCondition

creates a condition instance for the item-condition

Since use the sap.ui.mdc.condition.Condition.createItemCondition
Param Type DefaultValue Description
sFieldPath string

the FieldPath name of the condition

sKey string

the operator for the condition

sDescription string

the description of the operator

sap.ui.mdc.condition.ConditionModel.extend

Creates a new subclass of class sap.ui.mdc.condition.ConditionModel 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.model.json.JSONModel.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

getAllConditions

Returns all conditions.

Param Type DefaultValue Description
vFieldPath string string[]

fieldPath for that conditions are requested

getConditions

Returns conditions for a specified .

Param Type DefaultValue Description
sFieldPath string

fieldPath of the condition

sap.ui.mdc.condition.ConditionModel.getMetadata

Returns a metadata object for class sap.ui.mdc.condition.ConditionModel.

indexOf

Determines the index of a condition for a specified FieldPath.

Param Type DefaultValue Description
sFieldPath string

fieldPath of the condition

oCondition sap.ui.mdc.condition.ConditionObject

condition to be searched

fnNormalizeCondition function(Object) : Object

normalization method for condition comparison

insertCondition

Inserts a condition for a specified FieldPath.

Param Type DefaultValue Description
sFieldPath string

fieldPath of the condition

iIndex int

index where the condition should be inserted

oCondition sap.ui.mdc.condition.ConditionObject

condition to be inserted

bForce boolean

if set the condition will be inserted even if it already exist

merge

merge conditions from the source ConditionModel into this instance

Param Type DefaultValue Description
sFieldPath string

specifies which conditions should be removed and replaced by the conditions from the source ConditionModel

oSourceConditionModel sap.ui.mdc.condition.ConditionModel

source ConditionModel.

sSourceFieldPath string

specifies which conditions from the source should be merged.

removeAllConditions

Removes all conditions for a specified FieldPath.

Param Type DefaultValue Description
sFieldPath string

fieldPath of the condition

removeCondition

Removes a condition for a specified FieldPath.

Param Type DefaultValue Description
sFieldPath string

fieldPath of the condition

setConditions

Sets conditions. All already existing conditions will be removed.

Param Type DefaultValue Description
oConditions object

object of conditions for corresponding fieldPaths