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 Stringconvert(String value, ToDocumentIdentifierValueConvertContext context)StringconvertUnknown(Object value, ToDocumentIdentifierValueConvertContext context)Convert an input value of unknown type that may not have the required typeI.booleanisCompatibleWith(ToDocumentIdentifierValueConverter<?> other)
-
-
-
Method Detail
-
convert
public String convert(String value, ToDocumentIdentifierValueConvertContext context)
- Specified by:
convertin interfaceToDocumentIdentifierValueConverter<String>- Parameters:
value- The source value to convert.context- A context that can beextendedto 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:ToDocumentIdentifierValueConverterConvert 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:
convertUnknownin interfaceToDocumentIdentifierValueConverter<String>- Parameters:
value- The source value to convert.context- A context that can beextendedto 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:
isCompatibleWithin interfaceToDocumentIdentifierValueConverter<String>- Parameters:
other- AnotherToDocumentIdentifierValueConverter, nevernull.- Returns:
trueif 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.falseotherwise, or when in doubt.
-
-