Interface CalculableObjectLineItemColumns
- All Known Subinterfaces:
PriceCalculableObjectLineItemColumns,QapiCalculationGridLineItem,QapiCompensationRecord,QapiPriceGridLineItem,QapiPriceListLineItem,QapiRebateRecord
Several columns hold JSON strings. To read the result of a single logic element, use
calculationResult(String) rather than parsing completeCalculationResults().
Example:
def q = api.queryApi()
def t = q.tables().priceListLineItems(841)
return q.source(t, [t.id(), t.label(), t.workStatus(), t.manualOverrides()], t.tainted().isTrue())
.stream { it.collect { it } }
- Since:
- 14.3 - Caribou Lou
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionalerts()Returns the alerts triggered for the item by the last calculation, for all fields.Returns the item fields that users are allowed to override manually.calculationResult(String elementName) Returns the result of the given logic element from the last calculation of the item.comments()Returns the comments of the item.Returns all logic element results of the last calculation of the item, except internal ones.Returns whether the complete calculation results of the item are stored.dirty()Returns the flag that marks the item for another round of recalculation by the logic.Returns the mapping of item fields to logic element result suffixes.label()Returns the label of the item.Returns the logic elements whose result was actually overridden manually on the item.tainted()Returns the flag that marks an item that was changed or updated externally and needs recalculation.warnings()Returns the warnings triggered for the item by the last calculation, for all fields.Returns the work status of the item.
-
Method Details
-
label
SelectableExpression label()Returns the label of the item.- Returns:
- the label column as a String expression
-
comments
SelectableExpression comments()Returns the comments of the item.- Returns:
- the comments column as a String expression
-
workStatus
SelectableExpression workStatus()Returns the work status of the item.The work status is free text that users set to track their review of the item. It holds at most 15 characters, and longer values are truncated.
- Returns:
- the workStatus column as a String expression
-
alerts
SelectableExpression alerts()Returns the alerts triggered for the item by the last calculation, for all fields.The value is a JSON string.
- Returns:
- the alerts column as a String expression
- See Also:
-
warnings
SelectableExpression warnings()Returns the warnings triggered for the item by the last calculation, for all fields.The value is a JSON string.
- Returns:
- the warnings column as a String expression
- See Also:
-
allowedOverrides
SelectableExpression allowedOverrides()Returns the item fields that users are allowed to override manually.The list is defined by the logic and is used mainly to control what users can edit in the UI. The logic itself checks whether a manual override is allowed.
- Returns:
- the allowedOverrides column as a String expression
- See Also:
-
manualOverrides
SelectableExpression manualOverrides()Returns the logic elements whose result was actually overridden manually on the item.The value is a JSON string.
- Returns:
- the manualOverrides column as a String expression
- See Also:
-
itemExtensions
SelectableExpression itemExtensions()Returns the mapping of item fields to logic element result suffixes.The value is a JSON string that maps an item field to the suffix of a logic element result, for example
attribute1toRUB.- Returns:
- the itemExtensions column as a String expression
-
completeCalculationResults
SelectableExpression completeCalculationResults()Returns all logic element results of the last calculation of the item, except internal ones.The value is a JSON string. To read the result of one element, use
calculationResult(String).- Returns:
- the completeCalculationResults column as a String expression
- See Also:
-
calculationResult
Returns the result of the given logic element from the last calculation of the item.The value is the
resultof the calculation result whose element name matcheselementName, read fromcompleteCalculationResults(), ornullif there is no such result.- Parameters:
elementName- the element name to get the calculation result value string representation- Returns:
- the calculation result value of the given element name as a String expression (may contain json serialized data)
- See Also:
-
completeResultsAvailable
SelectableExpression completeResultsAvailable()Returns whether the complete calculation results of the item are stored.The value is
truewhencompleteCalculationResults()holds results, andfalseotherwise.- Returns:
- the completeResultsAvailable column as a Boolean expression
- See Also:
-
dirty
SelectableExpression dirty()Returns the flag that marks the item for another round of recalculation by the logic.- Returns:
- the dirty column as a Boolean expression
- See Also:
-
tainted
SelectableExpression tainted()Returns the flag that marks an item that was changed or updated externally and needs recalculation.- Returns:
- the tainted column as a Boolean expression
- See Also:
-