Class StringTenantIdentifierConverter

java.lang.Object
org.hibernate.search.mapper.pojo.tenancy.spi.StringTenantIdentifierConverter
All Implemented Interfaces:
TenantIdentifierConverter

@Incubating public class StringTenantIdentifierConverter extends Object implements TenantIdentifierConverter
A simple string-string tenant identifier converter implementation to support applications that were using string tenant identifiers with Hibernate Search.
  • Field Details

  • Constructor Details

    • StringTenantIdentifierConverter

      public StringTenantIdentifierConverter()
  • Method Details

    • toStringValue

      public String toStringValue(Object tenantId)
      Description copied from interface: TenantIdentifierConverter
      Converts an object representation of the tenant identifier to a string representation.
      Specified by:
      toStringValue in interface TenantIdentifierConverter
      Parameters:
      tenantId - The tenant identifier to convert to a string. May be null.
      Returns:
      A string representation of the tenant identifier.
    • fromStringValue

      public Object fromStringValue(String tenantId)
      Description copied from interface: TenantIdentifierConverter
      Converts a string representation of the tenant identifier to an object representation.
      Specified by:
      fromStringValue in interface TenantIdentifierConverter
      Parameters:
      tenantId - The tenant identifier to convert back to an object representation. May be null.
      Returns:
      An Object representation of the tenant identifier.