Module org.jooq
Package org.jooq

Interface AuditProvider

All Known Implementing Classes:
DefaultAuditProvider

@Pro public interface AuditProvider
An SPI to provide audit fields.

For convenience, consider extending DefaultAuditProvider instead of implementing this interface. This will prevent compilation errors in future versions of jOOQ, when this interface might get new methods.

Author:
Lukas Eder
  • Method Details

    • provideTimestamp

      @Nullable <T> @Nullable Field<T> provideTimestamp(GeneratorContext<?,?,T> ctx)
      Provide a temporal expression for auditing, defaulting to DSL.currentDate(), DSL.currentTime(), or DSL.currentTimestamp(), depending on the argument data type.
      Returns:
      The temporal expression, or null if no expression is available.
    • provideUser

      @Nullable <T> @Nullable Field<T> provideUser(GeneratorContext<?,?,T> ctx)
      Provide a credential expression for auditing, defaulting to DSL.currentUser().
      Returns:
      The credential expression, or null if no expression is available.