Class SQLServerRowLevelSecurity
java.lang.Object
org.hibernate.dialect.rowsecurity.SQLServerRowLevelSecurity
- All Implemented Interfaces:
RowLevelSecurity
Row-level security support for SQL Server.
-
Nested Class Summary
Nested classes/interfaces inherited from interface RowLevelSecurity
RowLevelSecurity.TenantIdentifierSource -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SQLServerRowLevelSecuritystatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTenantIdTableInitCommands(InFlightMetadataCollector collector, Table table, Column tenantIdentifierColumn, Metadata metadata, RowLevelSecurity.TenantIdentifierSource tenantIdentifierSource) Register table initialization commands enforcing discriminator-based multitenancy via native row-level security.voidsetTenantIdentifier(Connection connection, String tenantIdentifier, boolean root) Apply the current Hibernate tenant identifier to the database connection.booleanDoes this dialect natively support row-level security?Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RowLevelSecurity
getTenantIdTableCreateStrings, supportsTenantIdentifierSource
-
Field Details
-
INSTANCE
-
TENANT_IDENTIFIER_CONTEXT_KEY
- See Also:
-
ROOT_TENANT_IDENTIFIER_CONTEXT_KEY
- See Also:
-
TENANT_ISOLATION_POLICY
- See Also:
-
-
Constructor Details
-
SQLServerRowLevelSecurity
public SQLServerRowLevelSecurity()
-
-
Method Details
-
supportsRowLevelSecurity
public boolean supportsRowLevelSecurity()Description copied from interface:RowLevelSecurityDoes this dialect natively support row-level security?- Specified by:
supportsRowLevelSecurityin interfaceRowLevelSecurity
-
addTenantIdTableInitCommands
public void addTenantIdTableInitCommands(InFlightMetadataCollector collector, Table table, Column tenantIdentifierColumn, Metadata metadata, RowLevelSecurity.TenantIdentifierSource tenantIdentifierSource) Description copied from interface:RowLevelSecurityRegister table initialization commands enforcing discriminator-based multitenancy via native row-level security.- Specified by:
addTenantIdTableInitCommandsin interfaceRowLevelSecurity- Parameters:
collector- The metadata collectortable- The table containing the tenant id columntenantIdentifierColumn- The tenant id columnmetadata- The mapping metadatatenantIdentifierSource- The source used to resolve the tenant id
-
setTenantIdentifier
public void setTenantIdentifier(Connection connection, String tenantIdentifier, boolean root) throws SQLException Description copied from interface:RowLevelSecurityApply 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:
setTenantIdentifierin interfaceRowLevelSecurity- Parameters:
connection- The JDBC connectiontenantIdentifier- The tenant identifier rendered as a stringroot- Whether the tenant identifier is a root tenant- Throws:
SQLException
-