Represents some condition.
Implements
Index
Constructors
Public Properties
Protected Properties
Public Accessors
Public Methods
- addCondition
- addExpressionByOperand
- clearConditions
- expressionChanged
- fireChangedEvent
- getConditions
- getExpressionIndex
- getLevel
- getModel
- getOperatorId
- getParent
- getQuery
- isEmpty
- isGroup
- isInJoin
- isParameterized
- isReadOnly
- loadFromData
- removeConditionAt
- saveToData
- setInJoin
- setOperatorId
- setParameterized
- setParent
- setReadOnly
Constructors
constructor
The default constructor. ⊕ new Condition(query: Query,tag?: CondTag): Condition
Parameters:
Public Properties
blockId
The block id.
● blockId: string
expressions
The list of expression.
● expressions: Expression[]
justAdded
Condition enabled option.
● justAdded: boolean
linkType
The linking type.
● linkType: LinkType = LinkType.All
tag
The condition tag.
● tag: CondTag
Protected Properties
_enabled
The value indicating whether this Condition is enabled.
● _enabled: boolean
_id
● _id: string
conditions
The list of conditions.
● conditions: Condition[]
parent
● parent: Condition = null
query
● query: Query
Public Accessors
enabled
⇄ get enabled(): boolean
Returns boolean
⇄ set enabled(value: boolean
): void
Parameters:
- value:
boolean
Returns void
id
⇄ get id(): string
Returns string
Public Methods
addCondition
▸ addCondition(cond: Condition): number
Parameters:
- cond: Condition
Returns number
addExpressionByOperand
▸ addExpressionByOperand(operand: Operand,val?: string
): Expression
Parameters:
- operand: Operand
- val:
string
, Default value =null
Returns Expression
clearConditions
▸ clearConditions(): void
Returns void
expressionChanged
▸ expressionChanged(expr: Expression,oldValue: string
): void
Parameters:
- expr: Expression
- oldValue:
string
Returns void
fireChangedEvent
▸ fireChangedEvent(condPart?: ConditionPart): void
Parameters:
- condPart: ConditionPart, Default value =
ConditionPart.All
Returns void
getConditions
▸ getConditions(): Condition[]
Returns Condition[]
getExpressionIndex
▸ getExpressionIndex(expr: Expression): number
Parameters:
- expr: Expression
Returns number
getLevel
▸ getLevel(): number
Returns number
getModel
▸ getModel(): DataModel
Returns DataModel
getOperatorId
▸ getOperatorId(): string
Returns string
getParent
▸ getParent(): Condition
Returns Condition
getQuery
▸ getQuery(): Query
Returns Query
isEmpty
▸ isEmpty(): boolean
Returns boolean
isGroup
▸ isGroup(): boolean
Returns boolean
isInJoin
Indicates whether this condition must be placed into JOIN
clause in result SQL
.
▸ isInJoin(): boolean
Returns boolean
isParameterized
The value indicating whether this condition is parameterized.
▸ isParameterized(): boolean
Returns boolean
isReadOnly
Indicates whether this condition is read-only.
▸ isReadOnly(): boolean
Returns boolean
loadFromData
Loads condtion from its JSON representation object.
▸ loadFromData(model: DataModel,data: ConditionData): void
Parameters:
- model: DataModel - The Data Model.
- data: ConditionData - The JSON representation object.
Returns void
removeConditionAt
▸ removeConditionAt(index: number
): void
Parameters:
- index:
number
Returns void
saveToData
Saves condition to JSON representation object.
▸ saveToData(): ConditionData
Returns ConditionData - The JSON representation object.
setInJoin
▸ setInJoin(value: boolean
): void
Parameters:
- value:
boolean
Returns void
setOperatorId
▸ setOperatorId(newOperatorId: string
,silent?: boolean
): void
Parameters:
- newOperatorId:
string
- silent:
boolean
, Default value =false
Returns void
setParameterized
▸ setParameterized(value: boolean
): void
Parameters:
- value:
boolean
Returns void
setParent
▸ setParent(parent: Condition): void
Parameters:
- parent: Condition
Returns void
setReadOnly
▸ setReadOnly(value: boolean
): void
Parameters:
- value:
boolean
Returns void