Interface CalculableObjectColumns
- All Known Subinterfaces:
QapiCalculationGrid,QapiPriceGrid,QapiPriceList
public interface CalculableObjectColumns
Header columns shared by Price Lists, Live Price Grids and Calculation Grids, which are calculated as a
whole by a background calculation job.
Example:
import net.pricefx.domain.CalculationStatus
def q = api.queryApi()
def t = q.tables().priceLists()
return q.source(t, [t.id(), t.label(), t.targetDate(), t.status(), t.numberOfItems()],
t.status().equal(CalculationStatus.READY))
.stream { it.collect { it } }
- Since:
- 14.3 - Caribou Lou
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the date and time when the last calculation of the object ended.Returns the messages, such as errors, produced by the last calculation of the object.Returns the date and time when the last calculation of the object started.label()Returns the label of the object.Returns the number of items of the object.status()Returns the status of the calculation job of the object.Returns the target date of the object.
-
Method Details
-
status
SelectableExpression status()Returns the status of the calculation job of the object.The value is the name of one of the
CalculationStatusvalues.Example:
import net.pricefx.domain.CalculationStatus def q = api.queryApi() def t = q.tables().priceGrids() return q.source(t, [t.id(), t.label(), t.calculationMessages()], t.status().equal(CalculationStatus.ERROR)) .stream { it.collect { it } }- Returns:
- the status column as an Enum expression
- See Also:
-
calculationStartDate
SelectableExpression calculationStartDate()Returns the date and time when the last calculation of the object started.- Returns:
- the calculationStartDate column as a DateTime expression
- See Also:
-
calculationDate
SelectableExpression calculationDate()Returns the date and time when the last calculation of the object ended.The value is
nullif the object was never calculated.- Returns:
- the calculationDate column as a DateTime expression
- See Also:
-
targetDate
SelectableExpression targetDate()Returns the target date of the object.The calculation logic runs with this date as its target date.
Example:
def q = api.queryApi() def t = q.tables().priceLists() return q.source(t, [t.id(), t.label(), t.targetDate()], t.targetDate().lessOrEqual(new Date())) .stream { it.collect { it } }- Returns:
- the targetDate column as a DateOnly expression
-
label
SelectableExpression label()Returns the label of the object.Example:
def q = api.queryApi() def t = q.tables().calculationGrids() return q.source(t, [t.id(), t.label()], t.label().like("%2026%")) .stream { it.collect { it } }- Returns:
- the label column as a String expression
-
calculationMessages
SelectableExpression calculationMessages()Returns the messages, such as errors, produced by the last calculation of the object.The value is a JSON array of message strings.
- Returns:
- the calculationMessages column as a String expression
- See Also:
-
numberOfItems
SelectableExpression numberOfItems()Returns the number of items of the object.- Returns:
- the numberOfItems column as an Integer expression
-