Class DMLAuditAction


public class DMLAuditAction extends AbstractQActionFunction<DMLAuditInput,DMLAuditOutput>
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 via AuditsMetaDataProvider:
  • 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 Details

  • Constructor Details

    • DMLAuditAction

      public DMLAuditAction()
  • Method Details

    • execute

      public DMLAuditOutput execute(DMLAuditInput input) throws QException
      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:
      execute in class AbstractQActionFunction<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

      public static AuditLevel getAuditLevel(AbstractTableActionInput tableActionInput)
      Get the audit level for the table being operated on.