Class StringToDocumentIdentifierValueConverter
- java.lang.Object
-
- org.hibernate.search.engine.backend.types.converter.spi.StringToDocumentIdentifierValueConverter
-
- All Implemented Interfaces:
ToDocumentIdentifierValueConverter<String>
public final class StringToDocumentIdentifierValueConverter extends Object implements ToDocumentIdentifierValueConverter<String>
-
-
Constructor Summary
Constructors Constructor Description StringToDocumentIdentifierValueConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
convert(String value, ToDocumentIdentifierValueConvertContext context)
String
convertUnknown(Object value, ToDocumentIdentifierValueConvertContext context)
Convert an input value of unknown type that may not have the required typeI
.boolean
isCompatibleWith(ToDocumentIdentifierValueConverter<?> other)
-
-
-
Method Detail
-
convert
public String convert(String value, ToDocumentIdentifierValueConvertContext context)
- Specified by:
convert
in interfaceToDocumentIdentifierValueConverter<String>
- Parameters:
value
- The source value to convert.context
- A context that can beextended
to a more useful type, giving access to such things as a Hibernate ORM SessionFactory (if using the Hibernate ORM mapper).- Returns:
- The converted index field value.
-
convertUnknown
public String convertUnknown(Object value, ToDocumentIdentifierValueConvertContext context)
Description copied from interface:ToDocumentIdentifierValueConverter
Convert an input value of unknown type that may not have the required typeI
.Called when passing values to the predicate DSL in particular.
- Specified by:
convertUnknown
in interfaceToDocumentIdentifierValueConverter<String>
- Parameters:
value
- The source value to convert.context
- A context that can beextended
to a more useful type, giving access to such things as a Hibernate ORM SessionFactory (if using the Hibernate ORM mapper).- Returns:
- The converted index field value.
-
isCompatibleWith
public boolean isCompatibleWith(ToDocumentIdentifierValueConverter<?> other)
- Specified by:
isCompatibleWith
in interfaceToDocumentIdentifierValueConverter<String>
- Parameters:
other
- AnotherToDocumentIdentifierValueConverter
, nevernull
.- Returns:
true
if the given object behaves exactly the same as this object, i.e. itsToDocumentIdentifierValueConverter.convertUnknown(Object, ToDocumentIdentifierValueConvertContext)
method is guaranteed to always return the same value as this object's when given the same input.false
otherwise, or when in doubt.
-
-