Package org.hibernate.cfg
Interface MultiTenancySettings
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
public interface MultiTenancySettings
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Specifies aMultiTenantConnectionProvider
to use.static final String
Specifies aCurrentTenantIdentifierResolver
to use, either: an instance ofCurrentTenantIdentifierResolver
, aClass
representing a class that implementsCurrentTenantIdentifierResolver
, or the name of a class that implementsCurrentTenantIdentifierResolver
.static final String
Specifies aTenantSchemaMapper
to use, either: an instance ofTenantSchemaMapper
, aClass
representing a class that implementsTenantSchemaMapper
, or the name of a class that implementsTenantSchemaMapper
.static final String
During bootstrap, Hibernate needs access to aConnection
for access to theDatabaseMetaData
.
-
Field Details
-
MULTI_TENANT_CONNECTION_PROVIDER
Specifies aMultiTenantConnectionProvider
to use. SinceMultiTenantConnectionProvider
is also a service, it may be configured directly via theStandardServiceRegistryBuilder
.- Since:
- 4.1
- See Also:
-
MULTI_TENANT_IDENTIFIER_RESOLVER
Specifies aCurrentTenantIdentifierResolver
to use, either:- an instance of
CurrentTenantIdentifierResolver
, - a
Class
representing a class that implementsCurrentTenantIdentifierResolver
, or - the name of a class that implements
CurrentTenantIdentifierResolver
.
- Since:
- 4.1
- See Also:
- an instance of
-
TENANT_IDENTIFIER_TO_USE_FOR_ANY_KEY
During bootstrap, Hibernate needs access to aConnection
for access to theDatabaseMetaData
. This setting configures the tenant id to use when obtaining theDataSource
to use for this access.- See Also:
-
MULTI_TENANT_SCHEMA_MAPPER
Specifies aTenantSchemaMapper
to use, either:- an instance of
TenantSchemaMapper
, - a
Class
representing a class that implementsTenantSchemaMapper
, or - the name of a class that implements
TenantSchemaMapper
.
Connection.setSchema(String)
} is called on newly acquired JDBC connections with the schema name returned byTenantSchemaMapper.schemaName(T)
.By default, there is no tenant schema mapper.
- Since:
- 7.1
- See Also:
- an instance of
-