Class AbstractPostInsertCustomizer

java.lang.Object
com.kingsrook.qqq.backend.core.actions.customizers.AbstractPostInsertCustomizer
All Implemented Interfaces:
TableCustomizerInterface
Direct Known Subclasses:
ChildInserterPostInsertCustomizer, HelpContentPostInsertCustomizer

public abstract class AbstractPostInsertCustomizer extends Object implements TableCustomizerInterface
Abstract class that a table can specify an implementation of, to provide custom actions after an insert takes place. General implementation would be, to iterate over the records (the outputs of the insert action), and look at their values: - possibly adding Errors (`addError`) or Warnings (`addWarning`) to the records - possibly throwing an exception - though doing so won't stop the update, and instead will just set a warning on all of the updated records... - doing "whatever else" you may want to do. - returning the list of records (can be the input list) that you want to go back to the caller. Note that the full insertInput is available as a field in this class.
  • Field Details

  • Constructor Details

    • AbstractPostInsertCustomizer

      public AbstractPostInsertCustomizer()
  • Method Details

    • postInsert

      public List<QRecord> postInsert(InsertInput insertInput, List<QRecord> records) throws QException
      Description copied from interface: TableCustomizerInterface
      custom actions after an insert takes place. General implementation would be, to iterate over the records (the outputs of the insert action), and look at their values: - possibly adding Errors (`addError`) or Warnings (`addWarning`) to the records - possibly throwing an exception - though doing so won't stop the update, and instead will just set a warning on all of the updated records... - doing "whatever else" you may want to do. - returning the list of records (can be the input list) that you want to go back to the caller.
      Specified by:
      postInsert in interface TableCustomizerInterface
      Throws:
      QException
    • apply

      public abstract List<QRecord> apply(List<QRecord> records) throws QException
      Throws:
      QException
    • getInsertInput

      public InsertInput getInsertInput()
      Getter for insertInput
    • setInsertInput

      public void setInsertInput(InsertInput insertInput)
      Setter for insertInput