Module org.jooq
Package org.jooq

Interface ContextPolicyProvider

All Superinterfaces:
PolicyProvider

@Pro public interface ContextPolicyProvider extends PolicyProvider
A policy provider to provide a Policy for a table's row level security.
Author:
Lukas Eder
  • Method Details

    • provide

      @NotNull <R extends Record> @NotNull List<Policy<R>> provide(Table<R> table, PolicyContext ctx)
      Provide a list of Policy for a table's row level security.

      Implementations may provide a list of Policy for a table and a given type of statement. If different providers produce multiple policies for a given table, their Policy.condition() will be combined with Condition.and(Condition), implementing a restrictive access control strategy, as opposed to a permissive one.

      Parameters:
      table - The table to provide a policy for.
      ctx - The policy context that allows access to execute contexts, etc.
      Returns:
      The policy, or null if no policy exists.
    • provide

      default <R extends Record> List<Policy<R>> provide(Table<R> table)
      Description copied from interface: PolicyProvider
      Provide a list of Policy for a table's row level security.

      Implementations may provide a list of Policy for a table and a given type of statement. If different providers produce multiple policies for a given table, their Policy.condition() will be combined with Condition.and(Condition), implementing a restrictive access control strategy, as opposed to a permissive one.

      Specified by:
      provide in interface PolicyProvider
      Parameters:
      table - The table to provide a policy for.
      Returns:
      The policy, or null if no policy exists.