Top Description Methods
org.hibernate.context.spi

public Interface CurrentTenantIdentifierResolver


A callback registered with the org.hibernate.SessionFactory that is responsible for resolving the current tenant identifier for use with CurrentSessionContext and org.hibernate.SessionFactory#getCurrentSession()
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The current tenant identifier
resolveCurrentTenantIdentifier
()

Resolve the current tenant identifier.

public boolean

Returns:

true indicates that the extra validation will be performed; false indicates it will not.
validateExistingCurrentSessions
()

Should we validate that the tenant identifier on "current sessions" that already exist when CurrentSessionContext#currentSession() is called matches the value returned here from resolveCurrentTenantIdentifier()?

Method Detail

resolveCurrentTenantIdentifierback to summary
public String resolveCurrentTenantIdentifier()

Resolve the current tenant identifier.

Returns:String

The current tenant identifier

validateExistingCurrentSessionsback to summary
public boolean validateExistingCurrentSessions()

Should we validate that the tenant identifier on "current sessions" that already exist when CurrentSessionContext#currentSession() is called matches the value returned here from resolveCurrentTenantIdentifier()?

Returns:boolean

true indicates that the extra validation will be performed; false indicates it will not.

See Also
org.hibernate.context.TenantIdentifierMismatchException