Class RestoreWriteHelper
java.lang.Object
com.kingsrook.qqq.backend.core.actions.tables.helpers.RestoreWriteHelper
Helpers for the pieces of Insert/Update that behave differently under a
RestoreWriteFlag. Each method is only called when the flag is present; the
permission to use the flag is checked up front by the actions (via
CorePermissionEnforcer.checkRestoreWriteFlag).
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyFieldBehaviorsKeepingDates(ValueBehaviorApplier.Action action, QTableMetaData table, List<QRecord> records, Set<FieldBehavior<?>> behaviorsToOmit) Apply field behaviors (as ValueBehaviorApplier.applyFieldBehaviors), but keep any create-date / modify-date value the caller supplied - those behaviors only fill nulls in restore mode.static voidsetAutomationStatusOk(QTableMetaData table, List<QRecord> records) For an insert in restore mode with suppressAutomations: put records straight to automation status OK (unless the record supplied a status), rather than PENDING_INSERT_AUTOMATIONS.static voidwriteSummaryAudit(AbstractTableActionInput input, String operation, int successCount) Overload taking the count of successfully-written records directly.static voidwriteSummaryAudit(AbstractTableActionInput input, String operation, List<QRecord> records) Write the one summary audit for a restore-mode action call - honoring the table's audit level (none means no audit at all).
-
Method Details
-
applyFieldBehaviorsKeepingDates
public static void applyFieldBehaviorsKeepingDates(ValueBehaviorApplier.Action action, QTableMetaData table, List<QRecord> records, Set<FieldBehavior<?>> behaviorsToOmit) Apply field behaviors (as ValueBehaviorApplier.applyFieldBehaviors), but keep any create-date / modify-date value the caller supplied - those behaviors only fill nulls in restore mode. -
setAutomationStatusOk
For an insert in restore mode with suppressAutomations: put records straight to automation status OK (unless the record supplied a status), rather than PENDING_INSERT_AUTOMATIONS. -
writeSummaryAudit
public static void writeSummaryAudit(AbstractTableActionInput input, String operation, List<QRecord> records) Write the one summary audit for a restore-mode action call - honoring the table's audit level (none means no audit at all). Used in place of the per-record DML audit. -
writeSummaryAudit
public static void writeSummaryAudit(AbstractTableActionInput input, String operation, int successCount) Overload taking the count of successfully-written records directly.
-