Class DeleteAction

java.lang.Object
com.kingsrook.qqq.backend.core.actions.tables.DeleteAction

public class DeleteAction extends Object
Action to delete 1 or more records.
  • Constructor Details

    • DeleteAction

      public DeleteAction()
  • Method Details

    • execute

      public DeleteOutput execute(DeleteInput deleteInput) throws QException
      Throws:
      QException
    • performValidations

      public List<QRecord> performValidations(DeleteInput deleteInput, Optional<List<QRecord>> oldRecordList, boolean isPreview) throws QException
      this method takes in the deleteInput, and the list of old records that matched the pkeys in that input. it'll check if any of those pkeys aren't found (in a sub-method) - a record with an error message will be added to oldRecordList for any such records. it'll also then call the pre-customizer, if there is one - taking in the oldRecordList. it can add other errors or warnings to records. The return value here is basically oldRecordList - possibly with some new entries for the pkey-not-founds, and possibly w/ errors and warnings from the customizer.
      Throws:
      QException
    • getPrimaryKeysFromQueryFilter

      public static List<Serializable> getPrimaryKeysFromQueryFilter(DeleteInput deleteInput) throws QException
      For an implementation that doesn't support a queryFilter as its input, but a scenario where a query filter was passed in - run the query, to get a list of primary keys.
      Throws:
      QException