Package org.hibernate.context.spi
Interface CurrentTenantIdentifierResolver
-
public interface CurrentTenantIdentifierResolverA callback registered with theSessionFactorythat is responsible for resolving the current tenant identifier for use withCurrentSessionContextandSessionFactory.getCurrentSession()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringresolveCurrentTenantIdentifier()Resolve the current tenant identifier.booleanvalidateExistingCurrentSessions()Should we validate that the tenant identifier on "current sessions" that already exist whenCurrentSessionContext.currentSession()is called matches the value returned here fromresolveCurrentTenantIdentifier()?
-
-
-
Method Detail
-
resolveCurrentTenantIdentifier
java.lang.String resolveCurrentTenantIdentifier()
Resolve the current tenant identifier.- Returns:
- The current tenant identifier
-
validateExistingCurrentSessions
boolean validateExistingCurrentSessions()
Should we validate that the tenant identifier on "current sessions" that already exist whenCurrentSessionContext.currentSession()is called matches the value returned here fromresolveCurrentTenantIdentifier()?- Returns:
trueindicates that the extra validation will be performed;falseindicates it will not.- See Also:
TenantIdentifierMismatchException
-
-