Class AuditTracker

java.lang.Object
com.axelor.db.audit.AuditTracker

public class AuditTracker extends Object
This class provides change tracking for auditing and notifications.
  • Constructor Details

    • AuditTracker

      public AuditTracker()
  • Method Details

    • getTrackedCustomFields

      public static List<FieldTracking> getTrackedCustomFields(Model model)
    • getTrack

      public static ModelTracking getTrack(Model entity)
    • track

      public void track(SessionImplementor session, Model entity, String[] names, Object[] state, Object[] previousState)
      Track entity changes and create AuditLog IMMEDIATELY. Always creates new AuditLog - no queries, no consolidation here. Consolidation happens in AuditProcessor during background processing.
      Parameters:
      entity - the object being tracked
      names - the field names
      state - current values
      previousState - old values
    • deleted

      public void deleted(Model entity)
    • updated

      public void updated(Model entity)
    • doBeforeTransactionCompletion

      public void doBeforeTransactionCompletion(SessionImplementor session)
    • doAfterTransactionCompletion

      public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session)