Class RestoreWriteFlag

java.lang.Object
com.kingsrook.qqq.backend.core.model.actions.tables.RestoreWriteFlag
All Implemented Interfaces:
ActionFlag, Serializable

public class RestoreWriteFlag extends Object implements ActionFlag
ActionFlag for "restore-mode" writes - data operations such as restoring a backup, which must put records back exactly as they were, rather than treating the write as a business event. May be added to InsertInput, UpdateInput and ReplaceInput. Only a session that has the permission named by REQUIRED_PERMISSION may use it - the actions reject the input otherwise (see CorePermissionEnforcer.checkRestoreWriteFlag), whether or not the instance enforces permissions in core actions. When present:
  • supplied create-date and modify-date values are kept (the DynamicDefaultValueBehavior only fills nulls)
  • if suppressAutomations: records are not put in a PENDING automation status - an insert gets OK (unless it supplied a status), and an update leaves the status alone
  • table customizers (pre and post) only run if runCustomizers
  • the per-record DML audit is replaced by one summary audit per action call, unless perRecordAudit
  • record-change listeners (e.g., ESB publication) are skipped, unless publishEvents
Record-security locks, field-security write checks, unique-key checks and required-field and type validation always still run. Instances are used as plain values: find the one on an input via from(Set).
See Also:
  • Field Details

    • REQUIRED_PERMISSION

      public static final String REQUIRED_PERMISSION
      //////////////////////////////////////////////////////////////////////
      See Also:
  • Constructor Details

    • RestoreWriteFlag

      public RestoreWriteFlag()
  • Method Details

    • from

      public static RestoreWriteFlag from(Set<ActionFlag> flags)
      find the RestoreWriteFlag (if any) in a set of flags (which may be null).
    • getSuppressAutomations

      public boolean getSuppressAutomations()
      Getter for suppressAutomations
    • withSuppressAutomations

      public RestoreWriteFlag withSuppressAutomations(boolean suppressAutomations)
      Fluent setter for suppressAutomations (default true)
    • getRunCustomizers

      public boolean getRunCustomizers()
      Getter for runCustomizers
    • withRunCustomizers

      public RestoreWriteFlag withRunCustomizers(boolean runCustomizers)
      Fluent setter for runCustomizers (default false)
    • getPerRecordAudit

      public boolean getPerRecordAudit()
      Getter for perRecordAudit
    • withPerRecordAudit

      public RestoreWriteFlag withPerRecordAudit(boolean perRecordAudit)
      Fluent setter for perRecordAudit (default false)
    • getPublishEvents

      public boolean getPublishEvents()
      Getter for publishEvents
    • withPublishEvents

      public RestoreWriteFlag withPublishEvents(boolean publishEvents)
      Fluent setter for publishEvents (default false)