Interface CalculableLineItemColumns
- All Superinterfaces:
InputsColumns,OutputsColumns
- All Known Subinterfaces:
ClicColumns,QapiCompensationLineItem,QapiContractLineItem,QapiQuoteLineItem,QapiRebateLineItem
Line items form a tree: a line item is either a product line or a folder that groups other line items.
Use lineId() and parentId() to navigate this structure, and calculationStatus(),
editabilityStatus() and dirty() to check the state of each line item.
This interface replaces the deprecated ClicColumns, which declared the same columns.
Example:
def q = api.queryApi()
def t = q.tables().quoteLineItems("P-1234")
return q.source(t, [t.lineId(), t.parentId(), t.label(), t.calculationStatus()])
.stream { it.collect { it } }
- Since:
- 15.0.6 - Southside
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface InputsColumns
InputsColumns.InputColumnsNested classes/interfaces inherited from interface OutputsColumns
OutputsColumns.OutputColumns -
Method Summary
Modifier and TypeMethodDescriptionReturns the result of the last calculation of the line item.dirty()Returns the flag that marks a line item as needing recalculation.Returns the editing restriction of the line item.label()Returns the label of the line item, as displayed in the line item list of the document.lineId()Returns the identifier of the line item within its document.parentId()Returns the line ID of the folder that contains the line item.Methods inherited from interface InputsColumns
inputMethods inherited from interface OutputsColumns
output
-
Method Details
-
dirty
SelectableExpression dirty()Returns the flag that marks a line item as needing recalculation.The value is
truefor a line item that was added, copied or changed since the last calculation, and is reset tofalseonce the document is calculated.Example:
def q = api.queryApi() def t = q.tables().quoteLineItems("P-1234") return q.source(t, [t.lineId(), t.label()], t.dirty().isTrue()) .stream { it.collect { it } }- Returns:
- the dirty column as a Boolean expression
-
lineId
SelectableExpression lineId()Returns the identifier of the line item within its document.The line ID is generated by the system and is unique within the Quote, Agreement or Promotion, Rebate Agreement or Compensation Plan. Other line items reference it through
parentId().- Returns:
- the lineId column as a String expression
- See Also:
-
parentId
SelectableExpression parentId()Returns the line ID of the folder that contains the line item.The value is
nullfor line items at the top level of the document.Example:
def q = api.queryApi() def t = q.tables().quoteLineItems("P-1234") return q.source(t, [t.lineId(), t.label()], t.parentId().isNull()) .stream { it.collect { it } }- Returns:
- the parentId column as a String expression
- See Also:
-
calculationStatus
SelectableExpression calculationStatus()Returns the result of the last calculation of the line item.The value is a bit mask.
0means the line item was calculated without any message. Otherwise the value is the sum of the following flags:1(error),2(warning),4(red alert),8(yellow alert),16(critical alert) and32(missing required input).Example:
def q = api.queryApi() def t = q.tables().quoteLineItems("P-1234") return q.source(t, [t.lineId(), t.label(), t.calculationStatus()], t.calculationStatus().notEqual(0)) .stream { it.collect { it } }- Returns:
- the calculationStatus column as an Integer expression
-
editabilityStatus
SelectableExpression editabilityStatus()Returns the editing restriction of the line item.The value is
0(no restriction),1(read-only) or2(cannot be deleted).Example:
def q = api.queryApi() def t = q.tables().quoteLineItems("P-1234") return q.source(t, [t.lineId(), t.label()], t.editabilityStatus().equal(1)) .stream { it.collect { it } }- Returns:
- the editabilityStatus column as an Integer expression
-
label
SelectableExpression label()Returns the label of the line item, as displayed in the line item list of the document.Example:
def q = api.queryApi() def t = q.tables().quoteLineItems("P-1234") return q.source(t, [t.lineId(), t.label()], t.label().like("%Bracket%")) .stream { it.collect { it } }- Returns:
- the label column as a String expression
-