Interface CalculableLineItemColumns

All Superinterfaces:
InputsColumns, OutputsColumns
All Known Subinterfaces:
ClicColumns, QapiCompensationLineItem, QapiContractLineItem, QapiQuoteLineItem, QapiRebateLineItem

public interface CalculableLineItemColumns extends InputsColumns, OutputsColumns
Columns shared by the line items of Quotes, Agreements and Promotions, Rebate Agreements and Compensation Plans.

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:
  • Method Details

    • dirty

      Returns the flag that marks a line item as needing recalculation.

      The value is true for a line item that was added, copied or changed since the last calculation, and is reset to false once 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

      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

      Returns the line ID of the folder that contains the line item.

      The value is null for 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. 0 means 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) and 32 (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) or 2 (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

      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