File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
hibernate-core/src/main/java/org/hibernate/context/spi Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1717import static org .hibernate .cfg .MultiTenancySettings .MULTI_TENANT_SCHEMA_MAPPER ;
1818
1919/**
20- * Exposes useful strategy objects to user-written components, for example,
21- * to a custom implementation of {@link MultiTenantConnectionProvider}.
20+ * Exposes useful multitenancy-related strategy objects to user-written components.
21+ * <p>
22+ * The operation {@link #getTenantSchemaMapper} is especially useful in any custom
23+ * implementation of {@link MultiTenantConnectionProvider} which takes on responsibility
24+ * for {@linkplain MultiTenantConnectionProvider#handlesConnectionSchema setting the schema}.
2225 *
2326 * @since 7.1
2427 *
2730@ Incubating
2831public class MultiTenancy {
2932
33+ /**
34+ * Is a {@link MultiTenantConnectionProvider} available?
35+ */
3036 public static boolean isMultiTenancyEnabled (ServiceRegistry serviceRegistry ) {
3137 return serviceRegistry .getService ( MultiTenantConnectionProvider .class ) != null ;
3238 }
3339
40+ /**
41+ * Obtain the configured {@link CurrentTenantIdentifierResolver}.
42+ */
3443 @ SuppressWarnings ("unchecked" )
3544 public static CurrentTenantIdentifierResolver <Object > getTenantIdentifierResolver (
3645 Map <String ,Object > settings , StandardServiceRegistry registry ) {
@@ -52,6 +61,9 @@ public static CurrentTenantIdentifierResolver<Object> getTenantIdentifierResolve
5261 }
5362 }
5463
64+ /**
65+ * Obtain the configured {@link TenantSchemaMapper}.
66+ */
5567 @ SuppressWarnings ("unchecked" )
5668 public static TenantSchemaMapper <Object > getTenantSchemaMapper (
5769 Map <String ,Object > settings , StandardServiceRegistry registry ) {
You can’t perform that action at this time.
0 commit comments