An implementation that is capable of multi tenancy
| Type Params | Return Type | Name and description | 
|---|---|---|
|  | Datastore | getDatastoreForTenantId(java.io.Serializable tenantId)Obtains the datastore for the given tenant id. | 
|  | MultiTenancyMode | getMultiTenancyMode()@return The multi tenancy mode | 
|  | TenantResolver | getTenantResolver()@return Obtain the tenant resolver | 
| <T1> | T1 | withNewSession(java.io.Serializable tenantId, groovy.lang.Closure<T1> callable)Execute a new session with the given tenantId IF the session is not already present. | 
| Methods inherited from class | Name | 
|---|---|
| interface ConnectionSourcesProvider | getConnectionSources | 
| interface Datastore | connect, getApplicationContext, getApplicationEventPublisher, getCurrentSession, getMappingContext, hasCurrentSession, isSchemaless, withSession | 
| interface ServiceRegistry | getService, getServices | 
Obtains the datastore for the given tenant id. In SINGLE mode this will be a unique datastore for each tenant. For MULTI mode a single datastore is used for all tenants
tenantId -  The tenant id
Execute a new session with the given tenantId IF the session is not already present. This differs from the regular withNewSession method. The idea is that if there is already a transaction or session bound for the current tenant it should be re-used, otherwise one should be created
tenantId -  The tenant idcallable -  the callable