Interface ConditionRecordHelper

All Superinterfaces:
Help

public interface ConditionRecordHelper extends Help
  • Method Details

    • addOrUpdate

      Object addOrUpdate(Map<String,Object> values)
      Allows you to add or update data into the ConditionRecordItem (CRCI) table (CRCI1..CRCI12). This is done using the JST job and processing done over data in the ConditionRecordProcessing (CRCP) table, where data are inserted by this method. Therefore, the data cannot be read from the CRCI table within a single logic.

      This method is a wrapper for addOrUpdate(String, Map). It adds data necessary for Condition Record splicing process.

      Example:

      conditionRecordHelper.addOrUpdate([
       key1: "a value 1",
       validFrom: "2021-11-03",
       validTo: "2022-11-03",
       conditionRecordSetId: 1,
       conditionValue: 1,
       unitOfMeasure: "tons",
       currency: "USD",
       integrationStatus: 3,
       attribute1: "attr1 VAL",
       attribute2: "attr2 VAL11",
       attribute3: "attr3 VAL222",
       attribute4: "attr4 VAL3333",
       ])
       
      Note: conditionRecordSetId can be replaced by conditionRecordSetName.
      If conditionRecordSetId is specified, it takes priority and conditionRecordSetName is ignored.
      Parameters:
      values - A map of values to be inserted or updated in the database.
      Returns:
      Inserted object(s).
      Since:
      13.0 - Rampur
      See Also:
    • invalidate

      Object invalidate(Map<String,Object> values)
      Allows you to delete ConditionRecordItem identified by CRS id, key and validity period values. This is done using the JST job and processing done over data in the ConditionRecordProcessing (CRCP) table, where data are inserted by this method. Therefore, the data cannot be read from the CRCI table within a single logic.

      This method is a wrapper for addOrUpdate(String, Map). It adds data necessary for Condition Record splicing process.

      Example:

      conditionRecordHelper.delete([
       key1: "a value 1",
       validFrom: "2021-11-03",
       validTo: "2022-11-03",
       conditionRecordSetId: 1
       ])
       
      Note: conditionRecordSetId can be replaced by conditionRecordSetName.
      If conditionRecordSetId is specified, it takes priority and conditionRecordSetName is ignored.
      Parameters:
      values - A map of values to be used to identify CRCIX in the database.
      Returns:
      Object(s) to be deleted.
      Since:
      16.0 - Black Cat
      See Also:
    • shortenValidTo

      Object shortenValidTo(Map<String,Object> values)
      Allows you to shorten validTo of ConditionRecordItem identified by CRS id, key and validFrom values. It can be identified by validFrom only because there should not be any other item with the same value in validFrom. Otherwise, the data are corrupted. validTo is considered as new validTo value. This value should not be in the future according to current validTo value. This is done using the JST job and processing done over data in the ConditionRecordProcessing (CRCP) table, where data are inserted by this method. Therefore, the data cannot be read from the CRCI table within a single logic.

      This method is a wrapper for addOrUpdate(String, Map). It adds data necessary for Condition Record splicing process.

      Example:

      conditionRecordHelper.shortenValidTo([
       key1: "a value 1",
       validFrom: "2021-11-03",
       validTo: "2022-11-03",
       conditionRecordSetId: 1
       ])
       
      Note: conditionRecordSetId can be replaced by conditionRecordSetName.
      If conditionRecordSetId is specified, it takes priority and conditionRecordSetName is ignored.
      Parameters:
      values - A map of values to be used to identify CRCIX in the database.
      Returns:
      Object(s) to be deleted.
      Since:
      16.0 - Black Cat
      See Also:
    • addConditionRecordAction

      @Deprecated CRAction<ConditionRecordHelper> addConditionRecordAction()
      Deprecated.
      This method is deprecated and will be removed in a future patch release. It will be removed without replacement, because there will be no further need.
      Adds CR action to the list of actions that should be executed.

      Snippet:
      conditionRecordHelper.addOrUpdate([
       key1: "a value 1",
       validTo: "2022-11-03",
       conditionRecordSetId: 1,
       conditionValue: 1,
       unitOfMeasure: "tons",
       currency: "USD",
       integrationStatus: 3,
       attribute1: "attr1 VAL",
       attribute2: "attr2 VAL11",
       attribute3: "attr3 VAL222",
       attribute4: "attr4 VAL3333",
       ])
       conditionRecordHelper.addConditionRecordAction().setCalculate(true)}
       
      Returns:
      CR action object with further configuration options.
    • withSplicingOption

      SplicingOptions withSplicingOption()
      Add options for splicing process. For examples refer to return class.
      Returns:
      SplicingOptions.