Interface QapiConditionRecord

All Superinterfaces:
Map<String,SelectableExpression>, PersistedObjectColumns, Tables.Columns, Tables.Table

public interface QapiConditionRecord extends Tables.Table, PersistedObjectColumns
Table of the Condition Records of one Condition Record Set.

Obtain it with api.queryApi().tables().conditionRecords(String), passing the unique name of the Condition Record Set. The table has as many key columns as the set has keys (1 to 12); calling a key method above that number fails with an error. To read the records that were moved to history, use historicalConditionRecords(String).

Example, the records valid on the target date of the logic:


 def q = api.queryApi()
 def exprs = q.exprs()
 def t = q.tables().conditionRecords("Global Pricelist")
 def targetDate = api.targetDate()

 return q.source(t, [t.key1(), t.conditionValue(), t.currency()],
         exprs.and(t.validFrom().lessOrEqual(targetDate), t.validTo().greaterOrEqual(targetDate)))
         .stream { it.collect { it } }
 
Since:
14.0 - Caribou Lou
See Also:
  • Method Details

    • key1

      The keys identify what the condition applies to, for example a product and a customer. The table only has the key columns that the Condition Record Set uses.
      Returns:
      the key1 column (the first key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
    • key2

      Only available when the set has at least 2 keys.
      Returns:
      the key2 column (the second key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key3

      Only available when the set has at least 3 keys.
      Returns:
      the key3 column (the third key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key4

      Only available when the set has at least 4 keys.
      Returns:
      the key4 column (the fourth key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key5

      Only available when the set has at least 5 keys.
      Returns:
      the key5 column (the fifth key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key6

      Only available when the set has at least 6 keys.
      Returns:
      the key6 column (the sixth key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key7

      Only available when the set has at least 7 keys.
      Returns:
      the key7 column (the seventh key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key8

      Only available when the set has at least 8 keys.
      Returns:
      the key8 column (the eighth key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key9

      Only available when the set has at least 9 keys.
      Returns:
      the key9 column (the ninth key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key10

      Only available when the set has at least 10 keys.
      Returns:
      the key10 column (the tenth key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key11

      Only available when the set has at least 11 keys.
      Returns:
      the key11 column (the eleventh key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • key12

      Only available when the set has 12 keys.
      Returns:
      the key12 column (the twelfth key of the record) as an expression (its type will be taken from the corresponding attribute meta configuration if it exists)
      See Also:
    • validTo

      Returns:
      the validTo column (the last day of validity of the record) as a DateOnly expression
      See Also:
    • validFrom

      Returns:
      the validFrom column (the first day of validity of the record) as a DateOnly expression
      See Also:
    • conditionValue

      SelectableExpression conditionValue()
      Returns:
      the conditionValue column (the value of the condition, for example a price or a discount) as a Real expression
      See Also:
    • preciseConditionValue

      SelectableExpression preciseConditionValue()
      This field is independent of conditionValue(): the two values are not synchronized, and the logic or integration that writes the record decides which one to fill.
      Returns:
      the preciseConditionValue column (the value of the condition stored with a higher precision, up to 8 decimal places) as a Real expression
      Since:
      16.3.0 - Black Cat
      See Also:
    • priceUnit

      Returns:
      the priceUnit column (the price unit of the condition value) as a Real expression
      See Also:
    • unitOfMeasure

      SelectableExpression unitOfMeasure()
      Returns:
      the unitOfMeasure column (the unit of measure of the condition) as a String expression
    • currency

      Returns:
      the currency column (the currency of the condition value) as a String expression
    • integrationStatus

      SelectableExpression integrationStatus()
      Returns:
      the integrationStatus column (the integration status of the record) as an Integer expression
    • createdByObj

      SelectableExpression createdByObj()
      Returns:
      the createdByObj column (the typed ID of the object that created the record, for example 2147483656.PL for a Price List) as a String expression
      See Also:
    • lastUpdatedByObj

      SelectableExpression lastUpdatedByObj()
      Returns:
      the lastUpdatedByObj column (the typed ID of the object that last updated the record, for example 2147483656.PL for a Price List) as a String expression
      See Also:
    • extraData

      Returns:
      the extraData JSON column (the additional JSON data stored on the record) as an Object expression — the parsed JSON content of the field materialized as its natural Java type
      Since:
      16.3.6 - Black Cat