Class TenancyConfiguration

java.lang.Object
org.hibernate.search.mapper.orm.tenancy.spi.TenancyConfiguration
All Implemented Interfaces:
AutoCloseable

public class TenancyConfiguration extends Object implements AutoCloseable
  • Method Details

    • create

      public static TenancyConfiguration create(org.hibernate.search.engine.environment.bean.BeanResolver beanResolver, org.hibernate.search.engine.tenancy.spi.TenancyMode tenancyMode, org.hibernate.search.engine.cfg.ConfigurationPropertySource configurationPropertySource)
    • create

      public static TenancyConfiguration create(org.hibernate.search.engine.tenancy.spi.TenancyMode tenancyMode, org.hibernate.search.engine.environment.bean.BeanHolder<? extends org.hibernate.search.mapper.pojo.tenancy.TenantIdentifierConverter> tenantIdentifierConverter, Optional<Set<String>> tenantIds, String tenantIdsConfigurationPropertyKey)
    • tenantIdsOrFail

      public Set<String> tenantIdsOrFail()
      Returns:
      A set of all possible tenant IDs, or an empty set if the application is single-tenant.
      Throws:
      org.hibernate.search.util.common.SearchException - if the application is multi-tenant and the full list of tenant IDs was not configured.
    • invalidTenantId

      public org.hibernate.search.util.common.SearchException invalidTenantId(String tenantId)
    • convert

      public Object convert(String tenantIdentifier)
    • convert

      public String convert(Object tenantIdentifier)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • tenancyMode

      public org.hibernate.search.engine.tenancy.spi.TenancyMode tenancyMode()