Class DMLAuditAction
java.lang.Object
com.kingsrook.qqq.backend.core.actions.AbstractQActionFunction<DMLAuditInput,DMLAuditOutput>
com.kingsrook.qqq.backend.core.actions.audits.DMLAuditAction
Audit for a standard DML (Data Manipulation Language) activity - e.g.,
insert, edit, or delete.
This action creates audit records when tables with audit rules are modified.
It supports both RECORD-level auditing (simple log of changes) and FIELD-level
auditing (detailed tracking of individual field changes).
Primary Key Type Support
The audit system's support for different primary key types depends on how the audit tables are configured viaAuditsMetaDataProvider:
- INTEGER recordId (default): Only tables with INTEGER primary keys can be audited. Tables with other PK types are silently skipped.
- STRING recordId: Tables with any primary key type can be audited. Primary key values are converted to strings for storage.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(DMLAuditInput input) Execute the DML audit action for a table operation.static AuditLevelgetAuditLevel(AbstractTableActionInput tableActionInput) Get the audit level for the table being operated on.Methods inherited from class com.kingsrook.qqq.backend.core.actions.AbstractQActionFunction
executeAsync
-
Field Details
-
AUDIT_CONTEXT_FIELD_NAME
- See Also:
-
-
Constructor Details
-
DMLAuditAction
public DMLAuditAction()
-
-
Method Details
-
execute
Execute the DML audit action for a table operation. This method creates audit records based on the configured audit level (NONE, RECORD, or FIELD) and the type of DML operation being performed. If FIELD-level auditing is enabled, individual field changes are tracked with old and new values stored in audit detail records.- Specified by:
executein classAbstractQActionFunction<DMLAuditInput,DMLAuditOutput> - Parameters:
input- the DML audit input containing the table operation details and the records being modified- Returns:
- DMLAuditOutput (currently empty, reserved for future use)
- Throws:
QException- if there is an error during audit processing
-
getAuditLevel
Get the audit level for the table being operated on.
-