Class SQLServerRowLevelSecurity

java.lang.Object
org.hibernate.dialect.rowsecurity.SQLServerRowLevelSecurity
All Implemented Interfaces:
RowLevelSecurity

public class SQLServerRowLevelSecurity extends Object implements RowLevelSecurity
Row-level security support for SQL Server.
  • Field Details

  • Constructor Details

    • SQLServerRowLevelSecurity

      public SQLServerRowLevelSecurity()
  • Method Details

    • supportsRowLevelSecurity

      public boolean supportsRowLevelSecurity()
      Description copied from interface: RowLevelSecurity
      Does this dialect natively support row-level security?
      Specified by:
      supportsRowLevelSecurity in interface RowLevelSecurity
    • addTenantIdTableInitCommands

      public void addTenantIdTableInitCommands(InFlightMetadataCollector collector, Table table, Column tenantIdentifierColumn, Metadata metadata, RowLevelSecurity.TenantIdentifierSource tenantIdentifierSource)
      Description copied from interface: RowLevelSecurity
      Register table initialization commands enforcing discriminator-based multitenancy via native row-level security.
      Specified by:
      addTenantIdTableInitCommands in interface RowLevelSecurity
      Parameters:
      collector - The metadata collector
      table - The table containing the tenant id column
      tenantIdentifierColumn - The tenant id column
      metadata - The mapping metadata
      tenantIdentifierSource - The source used to resolve the tenant id
    • setTenantIdentifier

      public void setTenantIdentifier(Connection connection, String tenantIdentifier, boolean root) throws SQLException
      Description copied from interface: RowLevelSecurity
      Apply the current Hibernate tenant identifier to the database connection. Dialects may use this to populate session-local state referenced by their row-level security policies.
      Specified by:
      setTenantIdentifier in interface RowLevelSecurity
      Parameters:
      connection - The JDBC connection
      tenantIdentifier - The tenant identifier rendered as a string
      root - Whether the tenant identifier is a root tenant
      Throws:
      SQLException