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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTenantIdentifierConverter
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromStringValue
(String tenantId) Converts a string representation of the tenant identifier to an object representation.toStringValue
(Object tenantId) Converts an object representation of the tenant identifier to a string representation.
-
Field Details
-
INSTANCE
-
NAME
- See Also:
-
-
Constructor Details
-
StringTenantIdentifierConverter
public StringTenantIdentifierConverter()
-
-
Method Details
-
toStringValue
Description copied from interface:TenantIdentifierConverter
Converts an object representation of the tenant identifier to a string representation.- Specified by:
toStringValue
in interfaceTenantIdentifierConverter
- Parameters:
tenantId
- The tenant identifier to convert to a string. May benull
.- Returns:
- A string representation of the tenant identifier.
-
fromStringValue
Description copied from interface:TenantIdentifierConverter
Converts a string representation of the tenant identifier to an object representation.- Specified by:
fromStringValue
in interfaceTenantIdentifierConverter
- Parameters:
tenantId
- The tenant identifier to convert back to an object representation. May benull
.- Returns:
- An Object representation of the tenant identifier.
-